get_baseline_value: Get last value from baseline

View source: R/utils-scenarios.R

get_baseline_valueR Documentation

Get last value from baseline

Description

Get last value from baseline

Usage

get_baseline_value(
  value,
  year,
  type,
  scenario_col = NULL,
  scenario = NULL,
  baseline_year,
  type_filter = c("all", "reported", "estimated", "projected", "imputed"),
  direction = c("before", "after"),
  na_rm = TRUE
)

Arguments

value

(character vector) of values

year

(character vector) of years. Must be the same length as value

type

(character vector) of types. Must be the same length as value

scenario_col

(character vector) of scenarios. Must be the same length as value

scenario

name of scenario in which to look for the baseline value

baseline_year

Year integer at which to get the baseline_value

type_filter

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

direction

direction in which the last value should be found. before (default) looks in years before baseline_year, while after looks in years following baseline_year.

na_rm

(Boolean) indicating if NA should be removed (default) from type_filter or not.

See Also

General scenario functions add_scenario(), calculate_aarc(), calculate_aroc(), exec_scenario(), fill_cols_scenario(), flat_extrapolation(), get_aarr(), get_baseline_year(), get_last_value(), get_last_year_scenario(), 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.