pedquant (version 0.1.3)

ed_fred: query FRED economic data

Description

ed_fred provides an interface to access the economic data provided by FRED (https://fred.stlouisfed.org)

Usage

ed_fred(symbol = NULL, date_range = "10y", from = NULL, to = Sys.Date(),
  na_rm = FALSE, print_step = 1L)

Arguments

symbol

symbols of FRED economic indicators. It is available via function ed_fred_symbol or its website. Default is NULL, which calls ed_fred_symbol in the back.

date_range

date range. Available value includes '1m'-'11m', 'ytd', 'max' and '1y'-'ny'. Default is '10y'.

from

the start date. Default is NULL. If it is NULL, then calculate using date_range and end date.

to

the end date. Default is the current date.

na_rm

logical, whether to remove missing values. Default is FALSE

print_step

a non-negative integer, which will print symbol name by each print_step iteration. Default is 1L.

Value

a list of dataframes with columns of symbol, name, date, value, geo, unit. The geo column might be NA according to local internet connection.

Examples

Run this code
# NOT RUN {
dat = ed_fred(c("A191RL1A225NBEA", "GDPCA"))
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab