get_last_year_scenario: Get last value for the filter in default scenario

View source: R/utils-scenarios.R

get_last_year_scenarioR Documentation

Get last value for the filter in default scenario

Description

Get last value for the filter in default scenario

Usage

get_last_year_scenario(
  df,
  indicator,
  start_year = 2018,
  scenario = "default",
  scenario_col = "scenario",
  type_filter = c("reported", "estimated", "projected", "estimated")
)

Arguments

df

(data.frame) containing the data. Needs to have at least the year, scenario_col and type columns.

indicator

(character) identifying the indicator for which to get the last year of type_filter data.

start_year

Base year for contribution calculation, defaults to 2018.

scenario

name of scenario to recycle for.

scenario_col

Column name of column with scenario identifiers. Useful for calculating contributions on data in long format rather than wide format.

type_filter

(character vector) vector of types to be filtered for.

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_latest_aarc(), get_percent_change_aarc(), get_target_aarc(), remove_unwanted_scenarios(), trim_values(), trim_years()


gpw13/billionaiRe documentation built on Sept. 27, 2024, 10:05 p.m.