Description Usage Arguments Details Value
This function calculates element 71 (from initial existence).
1 | calculateEle71(data, aupusParam)
|
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). |
Element 71 is only computed for a few commodity types: 57, 58, 59, 60, and 61. For the last three types, the formula is short: element 71 = element 161 - element 11 (i.e. Final Existence minus Initial Existence). For the first two types, the computation is element 71 = element 51' + element 61 - element 91 - element 101 - element 121 - element 131 - element 141 - element 151.
Note: The documentation aupus_code_analysis.pdf has a typo. It does not mention how commodity type 57 should be handled, but after a conversation with Nick it was confirmed that commodity type 57 should be handled in the same way as commodity type 58.
This function returns a list (of length 2) of integer vectors containing the row numbers of observations which were updated (the first vector when a value was computed for commodity type 58, the second for when the value was computed for commodity types 59, 60, or 61). However, it also has a side effect: rows within the passed data.table ("data") have element 63's value and symbol updated.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.