if (FALSE) {
# All 3 getSymbols calls return the same
# MSFT to the global environment
# The last example is what NOT to do!
## Method #1
getSymbols('MSFT',src='rda')
getSymbols('MSFT',src='RData')
## Method #2
setDefaults(getSymbols,src='rda')
# OR
setSymbolLookup(MSFT='rda')
# OR
setSymbolLookup(MSFT=list(src='rda'))
getSymbols('MSFT')
#########################################
## NOT RECOMMENDED!!!
#########################################
## Method #3
getSymbols.rda('MSFT',verbose=TRUE,env=globalenv())
}
Run the code above in your browser using DataLab