Re: [R] Merge data frames but with a twist.

2009-08-27 Thread Gabor Grothendieck
er passes its 'format' > argument to  as.POSIXct() > Good deal! > Stephen > > > > - Original Message > From: Gabor Grothendieck > To: Stephen Tucker > Cc: Tony Breyal ; r-help@r-project.org > Sent: Thursday, August 27, 2009 7:27:26 AM > Subj

Re: [R] Merge data frames but with a twist.

2009-08-27 Thread Stephen Tucker
Cc: Tony Breyal ; r-help@r-project.org Sent: Thursday, August 27, 2009 7:27:26 AM Subject: Re: [R] Merge data frames but with a twist. On Thu, Aug 27, 2009 at 9:55 AM, Stephen Tucker wrote: > You may want to use the reshape package for this task: > >> library(reshape) >> recast

Re: [R] Merge data frames but with a twist.

2009-08-27 Thread Gabor Grothendieck
On Thu, Aug 27, 2009 at 9:55 AM, Stephen Tucker wrote: > You may want to use the reshape package for this task: > >> library(reshape) >> recast(DF3,Show ~ Datetime, id.var=names(DF3),value="Measure") >       Show 08/26/2009 11:30 AM 08/26/2009 9:30 AM > 1   Firefly                   3              

Re: [R] Merge data frames but with a twist.

2009-08-27 Thread Stephen Tucker
You may want to use the reshape package for this task: > library(reshape) > recast(DF3,Show ~ Datetime, id.var=names(DF3),value="Measure") Show 08/26/2009 11:30 AM 08/26/2009 9:30 AM 1 Firefly 3 1 2 Red Dwarf 4 2 If yo

Re: [R] Merge data frames but with a twist.

2009-08-27 Thread Henrique Dallazuanna
Try this: xtabs(as.numeric(Measure) ~ Show + Datetime, data = DF3) On Thu, Aug 27, 2009 at 8:04 AM, Tony Breyal wrote: > Dear all, > > Question: How to merge two data frames such that new column are added > in a particular way? > > I'm not actually sure how to best articulate my question to be