adj_inflation: A Function to get inflation-adjusted wages.

View source: R/adj_inflation.R

adj_inflationR Documentation

A Function to get inflation-adjusted wages.

Description

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/

Usage

adj_inflation(base_year)

Arguments

base_year

The base year of your choice (4 digits-year without quotation mark).

Value

wages and wages_hs_do data with a new column of inflation-adjusted wages value.

Examples

## Not run: 
   inflation_adjust(1990)

## End(Not run)


numbats/yowie documentation built on June 7, 2022, 10:29 a.m.