Re: [R] Preserving the class of POSIXt objects

2011-03-25 Thread Jeff Newmiller
library(plyr) ldply(x,function(v){data.frame(Start=v$Start,End=v$End)}) --- Jeff Newmiller The . . Go Live... DCN: Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/Batteries O.O#.

Re: [R] Preserving the class of POSIXt objects

2011-03-25 Thread David Wolfskill
On Fri, Mar 25, 2011 at 09:14:50PM +, Kenn Konstabel wrote: > Dear all, > > I am working with a list of objects each of which contains two POSIXct > objects (say, $Start and $End) and a number of different data in > addition to that. Now an easy way to extract Start times of all object > could

[R] Preserving the class of POSIXt objects

2011-03-25 Thread Kenn Konstabel
Dear all, I am working with a list of objects each of which contains two POSIXct objects (say, $Start and $End) and a number of different data in addition to that. Now an easy way to extract Start times of all object could be sapply(x, "[", "Start") but this converts them all to numeric, and so do