[R-SIG-Finance] reading high frequency data

Gabor Grothendieck ggrothendieck at gmail.com
Sun Aug 3 16:02:33 CEST 2014


On Sun, Aug 3, 2014 at 12:05 AM, jun wang <junluke at gmail.com> wrote:
> Dear All,
>
> I am trying to read some high frequency data using "read.zoo", but keeping
> getting some errors. Any help/suggestions would be really appreciated.
> Below is a sample of my data and the error message i am getting:
>
>
>   date time Last Price  06/20/2014 3:30:00 1962.48  06/20/2014 3:35:00
> 1962.2  06/20/2014 3:40:00 1961.67  06/20/2014 3:45:00 1962.18  06/20/2014
> 3:50:00 1962.9  06/20/2014 3:55:00 1962.35  06/20/2014 4:00:00 1962.4
> 06/20/2014 4:05:00 1962.24
>
> fmt <- "%m/%d/%Y %H:%M:%S"
> z <- read.zoo("sp_hf.csv",header=TRUE,index=1:2, tz = "", format = fmt)
>

Replace header = TRUE with skip = 1
z <- read.zoo("sp_hf.csv", skip = 1, index=1:2, tz = "", format = fmt)

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



More information about the R-SIG-Finance mailing list