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='csv')
## Method #2
setDefaults(getSymbols,src='csv')
# OR
setSymbolLookup(MSFT='csv')
getSymbols('MSFT')
#########################################
## NOT RECOMMENDED!!!
#########################################
## Method #3
getSymbols.csv('MSFT',verbose=TRUE,env=globalenv())
}
Run the code above in your browser using DataLab