[R] quantmod: Error in charToDate(x)

Swen Strek sven.strek at gmail.com
Thu Apr 28 07:32:08 CEST 2011


Hi,
I have following problem when trying to feed an CSV file to quantmod
using following command:

> require (quantmod)
> getSymbols("test1",src="csv")
Error in charToDate(x) :
 character string is not in a standard unambiguous format


The sample test1.csv  file contents:

Symbol, Date, Open, High, Low, Close, Volume
ABCDATA,2010-06-17,2.47,2.47,2.36,2.36,469299
ABCDATA,2010-06-18,2.38,2.39,2.36,2.38,77306


Before, I tried with a Date field without Date separators:

Symbol, Date, Open, High, Low, Close, Volume
ABCDATA,20100617,2.47,2.47,2.36,2.36,469299
ABCDATA,20100618,2.38,2.39,2.36,2.38,77306

But I ended up with a same Error message.

My question is where am I making the mistake? It seems that Date field is
not properly handled. How can one properly feed into quantmod OHLC csv
file?

I am using Windows edition of R v. 2.13.0


Best wishes to all,
Sven Strek



More information about the R-help mailing list