[R] quantmod package
R. Michael Weylandt
michael.weylandt at gmail.com
Mon Oct 31 16:14:10 CET 2011
Dear Ata,
I just tested it and it worked just fine for me. Perhaps you need to
test it during US market hours rather than when they are closed. (I'm
not sure what the yahoo finance website does then).
If you want to keep the whole getQuote object, you will probably have
to do a little work on the output before saving it to the text file
since getQuote returns a data frame, which has multiple data types
inside of it. My recommendation would be to isolate those columns you
want, unlist, convert to double if necessary/possible, and then store
that. You'll also need to slightly modify the read-back-in code to
take into account whatever you decide to do. If you can show me what
you've tried, I can help fix it up.
Michael
On Fri, Oct 28, 2011 at 2:21 AM, ATANU <ata.sonu at gmail.com> wrote:
> the code you posted works well except that when i am using chartSeries() it
> does not give any graphical stuff:
>
>
>>chartSeries(P,type="auto")
>>Error in if (on == "years") { : missing value where TRUE/FALSE needed
>
> i also tried to store the entire getQuote output (OHLC object) by the above
> manner but it then reads the number in a format (i guess character)
> unsupported by the chartSeries().
>
> --
> View this message in context: http://r.789695.n4.nabble.com/quantmod-package-tp3921071p3947026.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
More information about the R-help
mailing list