Re: [R] manipulating the Date & Time classes

2011-02-08 Thread Phil Spector
Mike - apply turns its argument into an array (in this case a matrix), which can't accomodate dates. To operate on the rows of a data frame, your best bet is probably to use a for loop. There's no reason to dread loops in R -- just try to avoid growing objects inside a loop by preallocatin

Re: [R] manipulating the Date & Time classes

2011-02-08 Thread Mike Williamson
Phil, Thanks! I am not sure why min & max sometimes work & other times don't work. In fact, running the script as you had it did work for me. For arrays that I had, it wasn't working and still isn't. For the moment, I won't worry about it. It seems maybe it is a hidden bug somewhere (or I

[R] manipulating the Date & Time classes

2011-02-08 Thread Mike Williamson
Hello, This is mostly to developers, but in case I missed something in my literature search, I am sending this to the broader audience. - Are there any plans in the works to make "time" classes a bit more friendly to the rest of the "R" world? I am not suggesting to allow for fancy