Perfect.
Thanks
--
View this message in context:
http://r.789695.n4.nabble.com/Date-Time-Objects-tp2993524p2993663.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinf
Try this:
sapply(0::(length(DateTime3)-1), function(i)format(strptime(start,
"%m/%d/%Y %H:%M") + i * interval, "%Y-%m-%d %H:%M:%S"))
On Wed, Oct 13, 2010 at 10:16 AM, dpender wrote:
>
> Thanks Henrique,
>
> Do you have any idea why the first entry doesn't have the time as the start
> specifie
Thanks Henrique,
Do you have any idea why the first entry doesn't have the time as the start
specified is "1/1/1981 00:00"?
Is it something to do with being at midnight?
Doug
--
View this message in context:
http://r.789695.n4.nabble.com/Date-Time-Objects-tp2993524p2993640.html
Sent from the
Try this:
sapply(0:(length(DateTime3)-1), function(i)as.character(strptime(start,
"%m/%d/%Y %H:%M") + i * interval))
On Wed, Oct 13, 2010 at 8:51 AM, dpender wrote:
>
> I am trying to convert an array from numeric values back to date and time
> format. The code I have used is as follows;
>
>
I am trying to convert an array from numeric values back to date and time
format. The code I have used is as follows;
for (i in 0:(length(DateTime3)-1)) {
DateTime3[i] <- (strptime(start, "%m/%d/%Y %H:%M")+ i*interval)
where start <- [1] "1/1/1981 00:00"
However the created array
5 matches
Mail list logo