Re: [R] class of strptime() output

2015-01-05 Thread Jeff Newmiller
Because data.frame converts it. I don't know what rationale was originally used to justify including that transformation automatically, but I think it is much better this way than having POSIXlt in the data frame. POSIXlt is itself like a little data frame, and having data frames inside of data

Re: [R] class of strptime() output

2015-01-05 Thread Jinsong Zhao
On 2015/1/5 20:51, David Winsemius wrote: On Jan 5, 2015, at 5:47 PM, Jinsong Zhao wrote: On 2015/1/5 17:28, Ben Bolker wrote: Jinsong Zhao yeah.net> writes: In the following code snippet, # a <- strptime("121114 0510", "%m%d%y %H%M") b <- data.frame(date = a, res = 1:5) class(a) class(b[

Re: [R] class of strptime() output

2015-01-05 Thread David Winsemius
On Jan 5, 2015, at 5:47 PM, Jinsong Zhao wrote: > On 2015/1/5 17:28, Ben Bolker wrote: >> Jinsong Zhao yeah.net> writes: >> >> >>> In the following code snippet, >>> # >>> a <- strptime("121114 0510", "%m%d%y %H%M") >>> b <- data.frame(date = a, res = 1:5) >>> class(a) >>> class(b[1,1]) >>> #

Re: [R] class of strptime() output

2015-01-05 Thread Jinsong Zhao
On 2015/1/5 17:28, Ben Bolker wrote: Jinsong Zhao yeah.net> writes: In the following code snippet, # a <- strptime("121114 0510", "%m%d%y %H%M") b <- data.frame(date = a, res = 1:5) class(a) class(b[1,1]) # I am wondering why the class of a and b[1,1] are not the same. How to make the class

Re: [R] class of strptime() output

2015-01-05 Thread Ben Bolker
Jinsong Zhao yeah.net> writes: > In the following code snippet, > # > a <- strptime("121114 0510", "%m%d%y %H%M") > b <- data.frame(date = a, res = 1:5) > class(a) > class(b[1,1]) > # > I am wondering why the class of a and b[1,1] are not the same. > > How to make the class of a and b[1,1] to b

[R] class of strptime() output

2015-01-05 Thread Jinsong Zhao
Hi there, In the following code snippet, # a <- strptime("121114 0510", "%m%d%y %H%M") b <- data.frame(date = a, res = 1:5) class(a) class(b[1,1]) # I am wondering why the class of a and b[1,1] are not the same. How to make the class of a and b[1,1] to be same? I would really appreciate you for