Downloads Symbols
to specified env
from getSymbols(Symbols,src='FRED')
will in
turn call this method. It is documented for the
sole purpose of highlighting the arguments
accepted, and to serve as a guide to creating
additional getSymbols
getSymbols.FRED(Symbols,
env,
return.class = "xts",
...)
Symbol
specified, with class defined
by return.class
. Presently this may be ts
,
its
, zoo
, xts
, or timeSeries
.getSymbols
(see also).One of many methods for loading
data for use with
Naming conventions must follow those as seen
on the Federal Reserve Bank of St Louis's
website for FRED. A lookup facility will hopefully
be incorporated into
getSymbols
,
setSymbolLookup
# All 3 getSymbols calls return the same
# CPI data to the global environment
# The last example is what NOT to do!
## Method #1
getSymbols('CPIAUCNS',src='FRED')
## Method #2
setDefaults(getSymbols,src='FRED')
# OR
setSymbolLookup(CPIAUCNS='FRED')
getSymbols('CPIAUCNS')
#########################################
## NOT RECOMMENDED!!!
#########################################
## Method #3
getSymbols.FRED('CPIAUCNS',env=globalenv())
Run the code above in your browser using DataLab