Description Usage Arguments Examples
Function to download a variable from FRED for multiple countries
1 | fred_loop(prefix, suffix, iso2c, var_name, single_symbol)
|
prefix |
character string FRED symbol prefix. |
suffix |
character string FRED symbol suffix. |
iso2c |
character vector of ISO two letter country codes. |
var_name |
character string of the name for the downloaded variable. |
single_symbol |
a character string of a single FRED symbol to download
only one series. Note: do not use with |
1 2 3 4 5 6 7 8 9 10 11 12 13 | #' # Download Central government debt, total (% of GDP) for Ireland
fred_loop(prefix = 'DEBTTL', suffix = 'A188A', iso2c = 'IE',
var_name = 'pubdebtgdp_cent_fred')
## Not run:
# Download Central government debt, total (% of GDP) for Ireland and Japan
fred_loop(prefix = 'DEBTTL', suffix = 'A188A', iso2c = c('IE', 'JP'),
var_name = 'pubdebtgdp_cent_fred')
## End(Not run)
# Download single series (US Federal Funds Rate)
fred_loop(single_symbol = 'FEDFUNDS', var_name = 'us_fed_funds')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.