I have recently plunged into R on a totally self-taught basis (may not have been the smartest decision!)
I am attempting to download tickers as a time series. I can successfully create RDA files but I want to convert them to CVS. Following is the code I have created so far.
if (!require(BatchGetSymbols)) install.packages('BatchGetSymbols')
library(BatchGetSymbols)
tickers <- c('SPY','VCR', 'RPG')
first.date <- Sys.Date() - 365
last.date <- Sys.Date
l.out <- BatchGetSymbols(tickers = tickers,
first.date = first.date,
last.date = last.date,
cache.folder = file.path("c://Users/Owner/Documents/R",
'BGS_Cache') )
print(l.out$df.control)
print(l.out$df.tickers)
I can print(l.out)
and see that it contains all the data, but it is not a
data.frame
Can anyone help with creating a data.frame and then converting to CSV?