[R] Problem with ddply in the plyr-package: surprising output of a date-column

2011-04-25 Thread Christoph Jäckel
Hi Together, I have a problem with the plyr package - more precisely with the ddply function - and would be very grateful for any help. I hope the example here is precise enough for someone to identify the problem. Basically, in this step I want to identify observations that are identical in

Re: [R] Problem with ddply in the plyr-package: surprising output of a date-column

2011-04-25 Thread Brian Diggs
On 4/25/2011 10:19 AM, Christoph Jäckel wrote: Hi Together, I have a problem with the plyr package - more precisely with the ddply function - and would be very grateful for any help. I hope the example here is precise enough for someone to identify the problem. Basically, in this step I want to

Re: [R] Problem with ddply in the plyr-package: surprising output of a date-column

2011-04-25 Thread Peter Ehlers
On 2011-04-25 10:19, Christoph Jäckel wrote: Hi Together, I have a problem with the plyr package - more precisely with the ddply function - and would be very grateful for any help. I hope the example here is precise enough for someone to identify the problem. Basically, in this step I want to

Re: [R] Problem with ddply in the plyr-package: surprising output of a date-column

2011-04-25 Thread William Dunlap
Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Brian Diggs Sent: Monday, April 25, 2011 11:05 AM To: christoph.jaec...@wi.tum.de Cc: r-help@r-project.org Subject:

Re: [R] Problem with ddply in the plyr-package: surprising output of a date-column

2011-04-25 Thread Brian Diggs
On 4/25/2011 11:55 AM, William Dunlap wrote: Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Brian Diggs Sent: Monday, April 25, 2011 11:05 AM To:

Re: [R] Problem with ddply in the plyr-package: surprising output of a date-column

2011-04-25 Thread Hadley Wickham
If you need plyr for other tasks you ought to use a different class for your date data (or wait until plyr can deal with POSIXlt objects). How do you get POSIXlt objects into a data frame? df - data.frame(x = as.POSIXlt(as.Date(c(2008-01-01 str(df) 'data.frame': 1 obs. of 1 variable:

Re: [R] Problem with ddply in the plyr-package: surprising output of a date-column

2011-04-25 Thread Christoph Jäckel
Hi together, thank you so much for your help! The problem was indeed the strptime-function. Replacing that with as.Date solves the problem, both in the example I provided and in my actual data set. I think this is a lesson for me to not use types I'm not really familiar with (POSIXlt in this

Re: [R] Problem with ddply in the plyr-package: surprising output of a date-column

2011-04-25 Thread Brian Diggs
On 4/25/2011 1:07 PM, Hadley Wickham wrote: If you need plyr for other tasks you ought to use a different class for your date data (or wait until plyr can deal with POSIXlt objects). How do you get POSIXlt objects into a data frame? df- data.frame(x = as.POSIXlt(as.Date(c(2008-01-01

Re: [R] Problem with ddply in the plyr-package: surprising output of a date-column

2011-04-25 Thread Peter Ehlers
On 2011-04-25 13:07, Hadley Wickham wrote: If you need plyr for other tasks you ought to use a different class for your date data (or wait until plyr can deal with POSIXlt objects). How do you get POSIXlt objects into a data frame? df- data.frame(x = as.POSIXlt(as.Date(c(2008-01-01