removeZeroConflict: Remove Zero Conflicts

Description Usage Arguments Value

Description

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.

Usage

1
2
3
removeZeroConflict(data, value1, value2, observationFlag1, observationFlag2,
  methodFlag1, methodFlag2, missingObservationFlag = "M",
  missingMethodFlag = "u", getSummary = FALSE)

Arguments

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

Value

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).


SWS-Methodology/faoswsProcessing documentation built on June 19, 2019, 5:14 p.m.