deflate: Deflation using GitHub-based CSV file

Description Usage Arguments Value Warning Examples

Description

Deflation using GitHub-based CSV file

Usage

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/")

Arguments

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

Value

Returns a data frame with the money_var deflated, otherwise identical to the original data frame

Warning

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.

Examples

1
2
3
4
RDTE_data <- deflate(
  data_to_deflate = RDTE_data,
  money_var = "Millions",
  fy_var = "fiscal_year")

CSISdefense/hamre documentation built on May 31, 2019, 7:58 a.m.