Inflation adjust a cost to present value

inflation_adjust_cost_custom(from_year, to_year, from_cost, inflation_df)

Arguments

from_year

base year to inflate from

to_year

destination year to inflate to

from_cost

base year cost

inflation_df

inflation annual rate data. dataframe of annual inflation data, in the format "year" = year (yyyy), "rate" = annual inflation rate (1/100th fraction)

Examples

inflation_df <- data.frame("year" = 2008:2010, "rate" = c(0.02, 0.03, 0.025)) inflation_adjust_cost_custom(2008, 2009, 100, inflation_df)
#> [1] 102
100*1.02 # 102
#> [1] 102