FRED: Get one or more series from FRED

Description Usage Arguments Details Value Examples

Description

FRED returns a data frame with series data

Usage

1
FRED(svec, key, full)

Arguments

svec

character vector with list of series

key

Your FRED API key (can be obtained for free - check http://api.stlouisfed.org/api_key.html)

full

determines whether to return all data including realtime dates default returns series name, date, and value

Details

Queries the FRED API to get the requested data

"Nicknames" are allowed for certain commonly used series:

gdp.q, gdp.a for nominal gdp, quarterly or annual

gdppi.q, gdppi.a for gdp price index, quarterly or annual

rgdp.q, rgdp.a for real gdp, quarterly or annual

Value

data frame

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
require(dplyr)
df <- FRED("GDP")
head(df)
df <- FRED(c("GDP", "GNP"))
tail(df)
vlist <- c("GDP", "GNP", "GDPCTPI", "GNPCA")
df <- FRED(vlist)
tail(df)
count(df, series)
count(df, freq)

## End(Not run)

donboyd5/apitools documentation built on May 15, 2019, 10:38 a.m.