finalStandardizationToPrimary: Final Standardization to Primary Equivalent

Description Usage Arguments Value

View source: R/finalStandardizationToPrimary.R

Description

After the full SUA has been balanced, all the commodities need to be rolled up to their primary equivalents. This function does this, aggregating up trade and food.

Usage

1
2
finalStandardizationToPrimary(data, tree, standParams, sugarHack = TRUE,
  specificTree = TRUE, cut = c(), additiveElements = c())

Arguments

data

The data.table containing the full dataset for standardization.

tree

The commodity tree which provides the edge structure. Note that this tree may be different than the processing tree, in particular if some commodities will be standardized into a different aggregate.

standParams

The parameters for standardization. These parameters provide information about the columns of data and tree, specifying (for example) which columns should be standardized, which columns represent parents/children, etc.

sugarHack

Logical. See standardizeTree for details.

specificTree

Logical. Is a country/year specific commodity tree being provided?

cut

is a vector of primary Equivalent commodities

additiveElements

Column names of data which should be aggregated/standardized via simple addition.

Value

A data.table with the aggregated primary commodities.


SWS-Methodology/faoswsStandardization documentation built on Feb. 7, 2022, 5:05 a.m.