Description Usage Arguments Value Warning Examples
Deflation using GitHub-based CSV file
1 2 3 | deflate(data_to_deflate, money_var = "Amount", fy_var = "Fiscal.Year",
deflator_file = "2016_deflators_actuals.csv",
path = "https://raw.githubusercontent.com/CSISdefense/hamre_lookups/master/")
|
data_to_deflate |
A data frame |
money_var |
The quoted name of the dollar-value variable |
fy_var |
The quoted name of the fiscal year variable |
deflator_file |
The quoted file name of the deflators to use; must be a CSV with the columns "FY" and "Deflator." |
path |
The path or url for the deflator_file CSV. By default, checks the CSISdefense Github lookups repository at CSISdefense/hamre_lookups/master |
Returns a data frame with the money_var deflated, otherwise identical to the original data frame
This function should be used __in data processing only__, not in a live app. It reads an external file from GitHub, which will slow down an app substantially if done repeatedly.
1 2 3 4 | RDTE_data <- deflate(
data_to_deflate = RDTE_data,
money_var = "Millions",
fy_var = "fiscal_year")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.