ensureValueRange: This function checks whether the values are within valid...

Description Usage Arguments Value

Description

This function checks whether the values are within valid range

Usage

1
2
ensureValueRange(data, ensureColumn, min = 0, max = Inf,
  includeEndPoint = TRUE, returnData = TRUE, getInvalidData = FALSE)

Arguments

data

The data to be saved back to the database

ensureColumn

The variable to be ensured.

min

The minimum bound of the variable

max

The maximum bound of the variable

includeEndPoint

Whether the end point of minimum and maximum should be included.

returnData

logical, whether the data should be returned

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.