computeFbsAggregate: Compute FBS Aggregate

Description Usage Arguments Value

View source: R/computeFbsAggregate.R

Description

This function takes the FBS aggregation tree and rolls up the SUA data to all FBS levels.

Usage

1
computeFbsAggregate(data, fbsTree, standParams)

Arguments

data

The data.table containing the full dataset for standardization.

fbsTree

This "tree" should just have three columns: standParams$parentID, standParams$childID, and standParams$extractVar (which if missing will just be assigned all values of 1). This tree specifies how SUA commodities get combined to form the FBS aggregates. If NULL, the last step (aggregation to FBS codes) is skipped and data is simply returned at SUA level.

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

A list of four data.tables, each containing the final FBS data at the four different FBS levels.


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