Description Usage Arguments Value Author(s) Source Examples
View source: R/pipeline-helpers.R
The GDP deflator is a measure of price inflation with respect to a specific base year; it allows us to back out the effects of inflation when we compare prices over time. This function calculates a deflator given a base year (the year to convert from) and a conversion year (the year to convert to). To use the deflator, multiply prices in base-year dollars by the deflator; the result will be prices in the converted dollar year.
1 | gdp_deflator(year, base_year)
|
year |
Year to convert TO. |
base_year |
Year to convert FROM. |
GDP Deflator. Multiply to convert FROM base_year
dollars TO
year
dollars.
BBL
U.S. Bureau of Economic Analysis, Gross domestic product (implicit price deflator) [A191RD3A086NBEA], retrieved from FRED, Federal Reserve Bank of St. Louis; https://fred.stlouisfed.org/series/A191RD3A086NBEA, April 12, 2017
1 2 | gdp_bil_1990USD <- c(4770, 4779, 4937)
gdp_bil_2010USD <- gdp_bil_1990USD * gdp_deflator(2010, base_year = 1990)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.