[R] intraday zoo

Santosh Srinivas santosh.srinivas at gmail.com
Fri Dec 3 13:37:04 CET 2010


I'm trying to read intraday zoo but running into issues (again) ...
what am I missing here? (the date doesn't seem to read in correctly)

> head(dat)
   TrdDate  TrdTime impliedVol
1 20090102 09:55:03  0.3610715
2 20090102 09:55:04  0.3637943
3 20090102 09:55:05  0.3752375
4 20090102 09:55:05  0.4190025
5 20090102 09:55:06  0.3696080
6 20090102 09:55:06  0.4944981

>  f <- function(x) chron(x[,1],x[,2], format=c(dates="ymd", times="h:m:s"))

> head(z)
(741031 09:55:03) (741031 09:55:04) (741031 09:55:05) (741031
09:55:05) (741031 09:55:06) (741031 09:55:06)
        0.3610715         0.3637943         0.3752375
0.4190025         0.3696080         0.4944981
Warning message:
In zoo(rval[i], x.index[i]) :
  some methods for “zoo” objects do not work if the index entries in
‘order.by’ are not unique
>



More information about the R-help mailing list