What are the advantages of placing data in a new .env in R?-speed, etc.
For data such as time series, is an new .env analogous to a database?
My question spans initally from downloading asset prices in R where it was suggested to place them into a new .env. Why is this so? Thank you:
library(TTR)
url = paste('http://www.nasdaq.com/markets/indices/nasdaq-100.aspx',sep="")
txt = join(readLines(url))
# extract tables from this pages
temp = extract.table.from.webpage(txt, 'Symbol', hasHeader = T)
temp[,2]
# Symbols
symbols = c(temp[,2])[2:101]
currency("USD")
stock(symbols, currency = "USD", multiplier = 1)
# create new environment to store symbols
symEnv <- new.env()
# getSymbols and assign the symbols to the symEnv environment
getSymbols(symbols, from = '2002-09-01', to = '2013-10-17', env = symEnv)