2
我有一個CSV文件包含分鐘匯率如何從動物園的2欄中讀取日期時間?
<TICKER>,<DTYYYYMMDD>,<TIME>,<OPEN>,<HIGH>,<LOW>,<CLOSE>,<VOL>
EURUSD,20110103,000000,1.3353,1.3354,1.3353,1.3354,4
EURUSD,20110103,000100,1.3355,1.3356,1.3355,1.3356,4
EURUSD,20110103,000200,1.3355,1.3356,1.3350,1.3350,4
EURUSD,20110103,000300,1.3349,1.3349,1.3348,1.3348,4
EURUSD,20110103,000400,1.3347,1.3348,1.3347,1.3348,4
...
嘗試做以下,但不適合我的工作。如何從2列讀取日期時間?
rate <- read.zoo("data.csv",sep=",",tz="",header=T, format='%Y%m%d %H%M%S', index = 2:3)
上面的代碼生成的錯誤:index has 5 bad entries at data rows: 1 2 3 4 5