[R] Downloading S&P monthly data into R
Pete Brecknock
Peter.Brecknock at bp.com
Sat Feb 12 06:11:33 CET 2011
1. Using the quantmod package.....
Look at ?getSymbols
e.g. getSymbols("^GSPC",src="yahoo")
then use the to.monthly function
2. Using the tseries package .....
Look at ?get.hist.quote
e.g. get.hist.quote(instrument = "^GSPC", start = as.yearmon("Jan 1950")
,compression = "m", quote = "Close")
There will be many other approaches.
HTH
Pete
--
View this message in context: http://r.789695.n4.nabble.com/Downloading-S-P-monthly-data-into-R-tp3302339p3302395.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list