Skip to content
Back to formatted view

Raw Message

Message-ID: <BANLkTinDfaN00JoaxXAjkyKm=gAruNhhQw@mail.gmail.com>
Date: 2011-04-28T05:32:08Z
From: Swen Strek
Subject: quantmod: Error in charToDate(x)
In-Reply-To: <BANLkTi=TM4zs0FAovV1ziDQW2Q6=5qd3_Q@mail.gmail.com>

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