Used within expand_df() to filter out the data based on the arguments keep_no_obs
and keep_before_obs.
Usage
expand_df_filter(
df,
response,
keep_no_obs,
keep_before_obs,
sort_col,
sort_descending,
group_col
)Arguments
- df
Data frame.
- response
Column name of response variables whose missing values will be infilled and projected, defaults to
"value".- keep_no_obs
Logical value indicating whether or not to keep rows in the expanded data frame when there is no data. Defaults to
TRUE. This is done based on thegroup_col, if provided.- keep_before_obs
Logical value indicating when data is available, whether or not to keep rows in the expanded data frame that lie before the first observed point. Defaults to
FALSE. This is done based on thesort_colandgroup_col, if provided.- sort_col
Column name(s) to use to
dplyr::arrange()the data prior to supplying type and calculating mean absolute scaled error on data involving time series. IfNULL, not used. Defaults to"year".- sort_descending
Logical value on whether the sorted values from
sort_colshould be sorted in descending order. Defaults toFALSE.- group_col
Column name(s) of group(s) to use in
dplyr::group_by()when supplying type, calculating mean absolute scaled error on data involving time series, and ifgroup_models, then fitting and predicting models too. IfNULL, not used. Defaults to"iso3".
