[R] xts array in minutes ?

John McKown john.archie.mckown at gmail.com
Sat Oct 11 18:20:22 CEST 2014


On Sat, Oct 11, 2014 at 11:03 AM, ce <zadig_1 at excite.com> wrote:
>
> Dear all,
>
> I want to convert to character arrays  "2014-10:10 00:00:00" and "2014-10-10:23:59:00" to an array of minutes :
>
> 2014-10:10 00:00:00
> 2014-10:10 00:01:00
> 2014-10:10 00:02:00
>
> What is the best way to do it ?
> thanks
>

Best? I don't know. My way:

minutes<-as.xts(as.POSIXct(seq(as.POSIXlt('2014-10-10
00:00:00'),as.POSIXlt('2014-10-10 23:59:00'),'min')));


-- 
There is nothing more pleasant than traveling and meeting new people!
Genghis Khan

Maranatha! <><
John McKown



More information about the R-help mailing list