Description Usage Arguments Value Examples
Returns FRED data as zoo object; it relies on the quantmod::getSymbols function but simplifies download and output
1 2 |
tickers |
character vector of FRED ticker(s) |
names |
optional character vector of column name(s) for zoo object; default uses 'tickers' vector |
start |
optional start date for data download; format is 'dd/mm/yyyy' |
end |
optional end date for data download; format is 'dd/mm/yyyy' |
time |
optional string to specify start date; options are 'D' (Days), 'W' (Weeks), 'M' (Months), 'Q' (Quarters), 'Y' (Years), or 'YTD' (Year-to-Date), e.g. '3M', '4Q', '5Y', 'YTD' |
na |
optional boolean to replace NAs with the last observation if set to FALSE |
returns a zoo object with the downloaded FRED data
1 2 3 4 | zoo <- getFRED(tickers = c('UNRATE', 'NROU'), names = c('US Unemployment', 'Natural Unemployment'))
zoo <- getFRED(tickers = c('UNRATE', 'NROU'), names = c('US Unemployment', 'Natural Unemployment'), time = '15Y', na = FALSE)
zoo <- getFRED(tickers = c("T10YIE", "T5YIE"), names = c("10Y Breakeven", "5Y Breakeven"), start = '01/01/2015')
zoo <- getFRED(tickers = c("CPIAUCSL", "PCEPILFE"), names = c("CPI", "Core PCE"), start = '01/01/2000', end = '01/01/2018')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.