Re: [R] How to make a vector/list/array of POSIXlt object?

2008-02-18 Thread Gabor Grothendieck
> From: [EMAIL PROTECTED] > > To: [EMAIL PROTECTED] > > Subject: Re: [R] How to make a vector/list/array of POSIXlt object? > > CC: r-help@r-project.org > > > > If the problem is that you have a vector of dates, a vector of times > > and a vector of dat

Re: [R] How to make a vector/list/array of POSIXlt object?

2008-02-18 Thread Bo Zhou
Ta. I will give that code a bash. Could you explain why my code didn't work? > Date: Mon, 18 Feb 2008 00:25:44 -0500 > From: [EMAIL PROTECTED] > To: [EMAIL PROTECTED] > Subject: Re: [R] How to make a vector/list/array of POSIXlt object? > CC: r-help@r-project.org > &

Re: [R] How to make a vector/list/array of POSIXlt object?

2008-02-17 Thread Gabor Grothendieck
gt; > Hmm... it worked, but not in a way I wanted. The class info is missing. > > So how to get the result like this below? I do need that mapply + > strptime(paste), cos my CSV file is formatted in that way! > > > df2 >X1 X2 > 1 2008-02-17 23:43:08 1 >

Re: [R] How to make a vector/list/array of POSIXlt object?

2008-02-17 Thread Bo Zhou
... it worked, but not in a way I wanted. The class info is missing. So how to get the result like this below? I do need that mapply + strptime(paste), cos my CSV file is formatted in that way! > df2 X1 X2 1 2008-02-17 23:43:08 1 > class(df2$X1) [1] "POSIXt" &

Re: [R] How to make a vector/list/array of POSIXlt object?

2008-02-17 Thread Gabor Grothendieck
Normally one uses POSIXct rather than POSIXlt for storage. See R News 4/1 for more info on date and time classes. On Feb 17, 2008 3:45 PM, Bo Zhou <[EMAIL PROTECTED]> wrote: > > Hi Guys, > > I'm cooking up my time series code. I want a data frame with first column as > timestamp in POSIXlt forma

[R] How to make a vector/list/array of POSIXlt object?

2008-02-17 Thread Bo Zhou
Hi Guys, I'm cooking up my time series code. I want a data frame with first column as timestamp in POSIXlt format. I hit on this the problem of how to create an array/list/vector of POSIXlt objects. Code is as follows > dtt=array(dim = 2) > t=as.POSIXlt( strptime("07/12/07 13:20:01", "%m/%d