ensureNoConflictingZero: Function to ensure that two value column does not contain...

Description Usage Arguments Value

Description

In the production domain, when production is zero, area harvested can not be zero by definition and vice versa.

Usage

1
2
3
ensureNoConflictingZero(data, valueColumn1, valueColumn2, returnData = TRUE,
  normalised = TRUE, denormalisedKey = "measuredElement",
  getInvalidData = FALSE)

Arguments

data

The data to be checked.

valueColumn1

The first variable for comparison.

valueColumn2

The second variable for comparison.

returnData

logical, whether the data should be returned for pipe.

normalised

logical, whether the data is normalised.

denormalisedKey

optional, only required if the input data is not normalised.It is the name of the key that denormalises the data.

getInvalidData

logical, this will skip the test and extract the data that is invalid.

Value

If getInvalidData is FALSE, then the data is returned when the test is cleared, otherwise an error. If getInvalidData is TRUE, then the subset of the data that is invalid is returned.


SWS-Methodology/faoswsEnsure documentation built on May 9, 2019, 11:47 a.m.