Description Usage Arguments Value
The function examines two variables of a data.table object. If one variable is 0 and another is not, then both variables are marked as missing. This is useful for variables which should always be zero concurrently, such as area harvested and production.
1 2 3 | removeZeroConflict(data, value1, value2, observationFlag1, observationFlag2,
methodFlag1, methodFlag2, missingObservationFlag = "M",
missingMethodFlag = "u", getSummary = FALSE)
|
data |
The data table object. |
value1 |
The column name of data corresponding to the first variable. |
value2 |
The column name of data corresponding to the second variable. |
observationFlag1 |
The column name of data containing the observation flag for the first variable. |
observationFlag2 |
The column name of data containing the observation flag for the second variable. |
methodFlag1 |
The column name of data containing the method flag for the first variable. |
methodFlag2 |
The column name of data containing the method flag for the second variable. |
missingObservationFlag |
The flag (character value) which should be placed in the observation flag columns to signify a missing value. |
missingMethodFlag |
The flag (character value) which should be placed in the method flag columns to signify a missing value. |
getSummary |
logic It is a logic parameter, if it is set to TRUE you can display on the console messages about how many items have been modified |
No value is returned. However, the object "data" which was passed to this function is modified (some values are marked as missing if the have conflicting zeroes).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.