Re: [R] Rearranging data

2010-02-18 Thread Henrique Dallazuanna
Try this also; xtabs(rate ~ date + corp_id + investment_id, data = DF) On Thu, Feb 18, 2010 at 7:21 AM, Anna Carter wrote: > Hi! > I have just started learning R and today only I have joined this group. This > is my first mail and I wish to thank all of you for allowing me to be part of > thi

Re: [R] Rearranging data

2010-02-18 Thread Barry Rowlingson
On Thu, Feb 18, 2010 at 12:14 PM, Barry Rowlingson wrote: >  Ooh, so close! If you'd said 'reshaped' you'd be half way there: .. because that is all in the reshape package. So do > library(reshape) first. Oops -- blog: http://geospaced.blogspot.com/ web: http://www.maths.lancs.ac.uk/~row

Re: [R] Rearranging data

2010-02-18 Thread Barry Rowlingson
On Thu, Feb 18, 2010 at 9:21 AM, Anna Carter wrote: > My objective is to rearrange filtered1 as > > date corp1   corp2   corp11    corp17 > 17-Feb   65    95 30  16 > 16-Feb   70   135 > 15-Feb   69   140 > 14-Feb   89 > 13-Feb   88 > > #(Th

[R] Rearranging data

2010-02-18 Thread Anna Carter
Hi! I have just started learning R and today only I have joined this group. This is my first mail and I wish to thank all of you for allowing me to be part of this group. I have following problem. I have an input.csv file such that corp_id      date    investment_id       rate corp1        17-F

[R] Rearranging Data

2008-07-30 Thread Jia Ying Mei
Hi everyone, A few days back Jim helped with out, helping me find an automated way of determining the mean and median of intervals between price changes. However, a new set of data I have is no longer in the same format. CDSmod is the file that was used with this code: x <- read.csv('/cdsmo