calculateFoodProc: calculateFoodProc

Description Usage Arguments Value

View source: R/calculateFoodProc.R

Description

calculateFoodProc

Usage

1
2
calculateFoodProc(data = data, params = c(), tree = tree,
  zeroWeight = zeroWeight)

Arguments

data

The data.table containing the full dataset for standardization. It should have columns corresponding to year, country, element, commodity, and value. The specific names of these columns should be in standParams.

params

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.

tree

The commodity tree which details how elements can be processed into other elements. It does not, however, specify which elements get aggregated into others. This data.table should have columns parent, child, extraction rate, share, and target (target specifying if an element is processed forward or not). Names of these columns should be provided in standParams.

zeroWeight

is vector of co-products

availability

is availability used for calculation of food processing

Value

A data.table containing the final balanced and standardized SUA data. Additionally, this table will have new elements in it if nutrientData was provided.


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