processForward: Process Forward

Description Usage Arguments Details Value

View source: R/processForward.R

Description

A few edges in the commodity trees are labeled with an 'F' to indicate that processing is 'forward'. The parent commodities in these edges are immediately converted into the corresponding child and then they are removed from the tree (as we will standardize to the children instead). This is a rare scenario; an example commodity is sugar.

Usage

1
processForward(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.

Details

Note: when commodities are processed forward like this, the final flag is assigned ARBITRARILY as the first flag observed (for lack of a better approach). This should be corrected.

Value

A list of names 'data' and 'tree'. Both objects must be returned, as the tree is updated by pruning off some edges.


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