[R-SIG-Finance] How to read minutes data from csv files with getSymbol in quantmod?
Jeff Ryan
jeff.a.ryan at gmail.com
Mon Nov 24 21:28:03 CET 2008
Hi Wind,
Gabor's answer is exactly what you need to do.
This is a known deficiency in getSymbols at present. I will make sure
to fix this in the next release.
There are some additional changes I need to do that should make it
easier to handle the variety of data formats/fields you'd expect a
general tool like getSymbols and xts to handle.
Thanks for email.
Jeff
2008/11/24 Wind <windspeedo at qq.com>:
> The following code could read the csv file but the time is trimmed to Dates.
> Any way we could read minutes data from csv as easy as getSymbols?
> Thanks.
>
> Codes:
> require(quantmod)
> getSymbols('EURO1',src="csv",dir="d:/datacenter/dataexchange")
>
> Output:
>> EURO1[1:5]
> EURO1.Open EURO1.High EURO1.Low EURO1.Close EURO1.Volume EURO1.Adjusted
> 2008-11-11 1.25490 1.25495 1.25410 1.25440 0 0
> 2008-11-11 1.25525 1.25555 1.25490 1.25490 0 0
> 2008-11-11 1.25665 1.25665 1.25525 1.25525 0 0
> 2008-11-11 1.25725 1.25725 1.25655 1.25665 0 0
> 2008-11-11 1.25735 1.25775 1.25715 1.25725 0 0
> Warning message:
> In zoo(rval, x.index[i]) :
> some methods for "zoo" objects do not work if the index entries in 'order.by' are not unique
>>
>
> Contents of d:/datacenter/dataexchange/EURO1.csv
>
> "","Open","High","Low","Close","Volum","Adjusted"
> "2008/11/14 22:57:00",1.272625,1.27345,1.27225,1.272775,0,0
> "2008/11/14 22:56:00",1.2709,1.27265,1.27075,1.27265,0,0
> "2008/11/14 22:55:00",1.268925,1.27115,1.268925,1.27085,0,0
> "2008/11/14 22:54:00",1.269275,1.269375,1.268725,1.268925,0,0
> "2008/11/14 22:53:00",1.26975,1.269775,1.26915,1.26925,0,0
> "2008/11/14 22:52:00",1.27005,1.27035,1.26955,1.269725,0,0
> "2008/11/14 22:51:00",1.27055,1.27055,1.26975,1.270025,0,0
> "2008/11/14 22:50:00",1.2704,1.27075,1.270225,1.27055,0,0
> "2008/11/14 22:49:00",1.26995,1.27055,1.26965,1.270375,0,0
> "2008/11/14 22:48:00",1.26955,1.26995,1.26885,1.269925,0,0
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
--
Jeffrey Ryan
jeffrey.ryan at insightalgo.com
ia: insight algorithmics
www.insightalgo.com
More information about the R-SIG-Finance
mailing list