I am trying to load multiple symbols using a csv file rather than downloading from Yahoo. The original code works great and uses
load.packages('quantmod')
tickers = spl('TLT,IWM,GLD')
data <- new.env()
getSymbols(tickers, src = 'yahoo', from = '1980-01-01', env = data,
auto.assign = T)
when I try using the code below, however, it results in "subscript out of bounds" errors later in the script:
load.packages('quantmod')
tickers = spl('TLT,IWM,GLD')
data <- new.env()
getSymbols(tickers, src="csv", dir= "C:/Users/Admiral/Downloads/",
env = data, auto.assign = T)
Anyone have thoughts why the second code set wont work? To test I've just downloaded csv data from Yahoo and saved locally (windows). I dont get the subscript errors if I just use one csv file. I've also tried the code below but get the same errors later in the script:
setSymbolLookup(tickers=list(src="csv", dir= "C:/Users/Admiral/Downloads/"))
getSymbols(tickers, auto.assign = T, from = '1980-01-01', env=data)