[R] How to create a time series object with time only (no date)

Gabor Grothendieck ggrothendieck at gmail.com
Sun Dec 21 21:50:43 CET 2014


On Sun, Dec 21, 2014 at 12:09 AM, ce <zadig_1 at excite.com> wrote:
>
> Dear all,
>
> I want to create a time series object from 00:00:00 to 23:59:00 without dates ?
> I can't figure it out with xts ?
>

This uses zoo, rather than xts:

library(zoo)
library(chron)

tt <- seq(times("00:00:00"), times("23:59:00"), by = times("00:01:00"))
dat <- 1:1440
z <- zoo(dat, tt)


-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com



More information about the R-help mailing list