rollUpFood: Roll up food

Description Usage Arguments Value

Description

This function takes SUA level data and standardizes up the required production values for processed commodities into a food value for their parents. The idea is that we have official and estimated data at the SUA level, and the imbalances at this level translate into an imbalance in their parent commodities. To capture/account for this imbalance, we roll it up into food at the top line. Note that the original estimates for food will be stored in this table under a new element code: the current food element code pasted with "_orig". These original values need to be saved somewhere, and this seemed like a reasonable place.

Usage

1
rollUpFood(data, tree, standParams)

Arguments

data

The data.table containing the full dataset for standardization.

tree

The commodity tree which provides the edge structure.

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.

Value

The same data.table as was passed ("data") but with updated food distributions to account for standardized production of children commodities.


SWS-Methodology/faoswsAupus documentation built on May 9, 2019, 11:45 a.m.