remove_redundant_alls: Remove redundant "All" values from selected variables...

View source: R/model-downscale.R

remove_redundant_allsR Documentation

Remove redundant "All" values from selected variables (columns)

Description

An "All" value for an ID column may be the only data available, or it may be derived from the sum of available components. Except for diagnostic purposes, "All" and its sub-components should never be downscaled independently due to potentially different proxies. Instead, where component-level data are available, "All" should be computed post-hoc as the sum of the components. This function drops redundant "All" values (i.e., values that could be computed from provided components).

Usage

remove_redundant_alls(data, variables = ITEM_IDVARS_WITH_ALLS, ...)

Arguments

data

data frame with model-reported quantity variables

variables

data frame with model-reported quantity variables

Details

Note that the method assumes that if any components are provided for a given variable that has "All" reported, then all necessary components to re-calcualate the reported "All" value are provided. However this condition is not checked numerically, and the method will result in a loss of data if a model provided a category called "All", and some but not all of its sub-components.


transportenergy/item_mip_data_processing documentation built on July 6, 2023, 7:51 p.m.