Skip to content
Prev 11055 / 15274 Next

time index in high frequency data

You could find more direction on the r-help list .. I remember using
help from that list

You can do something like this.  (Code pasted from my routine)

f2 <- function(d, t, format = "%Y%m%d %H:%M:%S") {
as.POSIXct(strptime(paste(d, t),format=format))
}

require(zoo)
optData.z <- read.zoo(optData.df.1[c(1:2,5:11)],index=list(1,2), FUN=f2)

The index columns refer to the date and time in your dataset.

zoo objects can be converted to xts using as.xts

I think you should be able to create xts directly using a similar approach
On Mon, Dec 3, 2012 at 5:10 PM, Wei-han Liu <weihanliu2002 at yahoo.com> wrote: