Description Usage Arguments Details Value
Each commodity has a ratio defined, R_261/R_271/R_281, which gives the conversion rate of the quantity of the commodity in question into calories/proteins/fats. Thus, element 261/271/281 is computed simply as E_261 = E_141 * R_261 / 100
1 | calculateTotalNutritive(ratioNum, elementNum, data, aupusParam)
|
ratioNum |
The column name of data corresponding to the ratio for this element. Typically one of "Ratio_measuredElementFS_261" for calories, "Ratio_measuredElementFS_271" for proteins, or "Ratio_measuredElementFS_261" for fats. |
elementNum |
The element number. Currently, this should be one of 261 (calories), 271 (proteins) or 281 (fats). |
data |
The AUPUS node dataset, typically as produced by buildNodes. |
aupusParam |
A list of running parameters to be used in pulling the data. Typically, this is generated from getAupusParameter (see that function for a description of the required elements). |
E_271 = E_141 * R_271 / 1000
E_281 = E_141 * R_281 / 1000
This function returns an integer vector containing the row numbers of observations which were updated. However, it also has a side effect: rows within the passed data.table ("data") have element 261/271/281's value and symbol updated.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.