Re: [R] pass character vector in instrument field of get.hist.quote function

From: algotr8der <algotr8der_at_gmail.com>
Date: Sat, 12 Mar 2011 21:18:28 -0800 (PST)

Thanks David for the reply. I just tried the following with the same result:

>library(tseries)
>tickers <- read.csv("testticker.txt", header=FALSE, sep=",")
>tickers <- tickers[1]

     V1
1 XOM
2 COP
3 PBR-A
4 FFIV
5 SU
6 PBR-B
> tickers$V1 <- as.character(tickers$V1)
> tickers$V1
[1] "XOM" "COP" "PBR-A" "FFIV" "SU" "PBR-B"
> symbols <- tickers$V1
> symbols

[1] "XOM" "COP" "PBR-A" "FFIV" "SU" "PBR-B"
> stockdata <- data.frame()
> stockdata <- coredata(get.hist.quote(instruments=symbols,
> start="2011-01-01", end="2011-01-31", quote=c("Close"), provider="yahoo"))
Error in get.hist.quote(instruments = symbols, start = "2011-01-01", end = "2011-01-31", :
  unused argument(s) (instruments = symbols)

--
View this message in context: http://r.789695.n4.nabble.com/pass-character-vector-in-instrument-field-of-get-hist-quote-function-tp3350779p3351331.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.
Received on Sun 13 Mar 2011 - 05:36:29 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 13 Mar 2011 - 07:00:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive