View source: R/utils-scenarios.R
flat_extrapolation | R Documentation |
Flat extrapolation
flat_extrapolation(
df,
col,
group_col = NULL,
sort_col = "year",
pred_col = "pred",
sort_descending = FALSE,
replace_obs = c("missing", "none")
)
df |
Data frame of model data |
col |
Name of column to extrapolate/interpolate. |
group_col |
Column name(s) of group(s) to use in |
sort_col |
Column name(s) to use to |
pred_col |
Column name to store predicted value. |
sort_descending |
Logical value on whether the sorted values from |
replace_obs |
Character value specifying how, if at all, observations should be replaced by fitted values. Defaults to replacing only missing values, but can be used to replace all values or none. |
a data frame with predicted data,
General scenario functions
add_scenario()
,
calculate_aarc()
,
calculate_aroc()
,
exec_scenario()
,
fill_cols_scenario()
,
get_aarr()
,
get_baseline_value()
,
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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.