Date error while reading csv file into getSymbols

杀马特。学长 韩版系。学妹 提交于 2019-12-11 03:00:27

问题


I'm trying to read a csv file from my local machine using quantmod. I tried the getSymbols method but it failed but it seemed to be working when used with src="yahoo". So I downloaded a file from yahoo and replaced it with my data.

getSymbols("STOCKFUT",src="csv")

R is now able to read the file. However when I type:

> head(STOCKFUT)
           STOCKFUT.Open STOCKFUT.High STOCKFUT.Low STOCKFUT.Close
2014-03-18         393.70         396.00        388.10          391.65
2014-03-18         392.20         394.95        388.20          391.00
2014-03-18         389.00         389.00        365.00          373.25
2014-03-18         371.60         371.80        357.00          359.10
2014-03-18         359.40         367.45        358.55          365.25
2014-03-18         365.25         370.90        359.30          360.80
           STOCKFUT.Volume STOCKFUT.Adjusted
2014-03-18                0                  0
2014-03-18                0                  0
2014-03-18                0                  0
2014-03-18                0                  0
2014-03-18                0                  0
2014-03-18                0                  0

The date is the same throughout the file! Any suggestions on how I can rectify this?

来源:https://stackoverflow.com/questions/22477637/date-error-while-reading-csv-file-into-getsymbols

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!