getProductionFormula: Get Yield Formula

View source: R/getProductionFormula.R

getProductionFormulaR Documentation

Get Yield Formula

Description

This function provides the element codes (for production, yield, and output) and conversion factor which correspond to the particular item code of interest.

Usage

getProductionFormula(itemCode, itemVar = "measuredItemCPC", warn = FALSE)

Arguments

itemCode

The cpc code providing the commodity of interest. This should be a character string.

itemVar

The name of the item variable column.

warn

Logical. If FALSE, an error is thrown for missing element types. If TRUE, it is simply a warning.

Value

A data.table object providing the relevant element codes. In some cases, there may be multiple rows, as it is possible to have multiple elements which hold production, yield, and output data.


SWS-Methodology/faoswsProduction documentation built on March 21, 2023, 8:27 p.m.