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.

______________________________________________
R-help@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.

Reply via email to