View source: R/adj_inflation.R
adj_inflation | R Documentation |
This function aims to adjust the wage
column in wages
and wages_hs_do
with the
inflation rate of the base year of your choice.
The inflation rate is calculated from the CPI data published by the US Bureau of Labor Statistics (BLS).
This function needs internet connection to download the data from the BLS website.
The code is adapted from Kris Eberwein in R Bloggers website. https://www.r-bloggers.com/2015/12/calculate-inflation-with-r/
adj_inflation(base_year)
base_year |
The base year of your choice (4 digits-year without quotation mark). |
wages and wages_hs_do data with a new column of inflation-adjusted wages value.
## Not run: inflation_adjust(1990) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.