I am using the Quantmod package in R for some data analysis. Now I can downbload price history of particular stocks or index with the following code:-
library(quantmod) # Loading quantmod library
getSymbols("^DJI", from = as.character(Sys.Date()-365*3))
I want to download all the ticker symbols that are composite of a particular Index such as DJI for example. What will be the best way to do that through R?
Thanks a lot in advance.