Get AARC for data frame based on a percent change to baseline
Source:R/utils-scenarios.R
get_percent_change_aarc.Rd
Gets the annual average rate of change (AARC or AROC) between the
baseline year and the target year given a percent change between the two
years for every combination of iso3
and ind
present in df
.
Usage
get_percent_change_aarc(
df,
percent_change,
baseline_year,
target_year,
value_col = "value"
)
Arguments
- df
Data frame in long format, where 1 row corresponds to a specific country, year, and indicator.
- percent_change
Numeric with the percent_change. Should be expressed a as percentage point and not a fraction of 100 (e.g. 6% increase = 6, and not 0.06).
- baseline_year
Year from which the scenario is measured. Defaults to
start_year
- target_year
Year by which the scenario should eventually be achieved. Defaults to
end_year
- value_col
Column name of column with indicator values.
See also
General scenario functions
add_scenario()
,
calculate_aarc()
,
calculate_aroc()
,
exec_scenario()
,
fill_cols_scenario()
,
flat_extrapolation()
,
get_aarr()
,
get_baseline_value()
,
get_baseline_year()
,
get_last_value()
,
get_last_year_scenario()
,
get_latest_aarc()
,
get_target_aarc()
,
remove_unwanted_scenarios()
,
trim_values()
,
trim_years()