CheckForBadValues: Checks for bad values in given columns.

Description Usage Arguments Value

View source: R/utils_assert.R

Description

Checks for bad values in given columns.

Usage

1
CheckForBadValues(x, columns, CHECK, good = TRUE, what = "invalid", ...)

Arguments

x

(data frame) any data frame.

columns

(character) columns to check.

CHECK

(function) function that returns a logical vector (of length nrow(x)).

good

(logical) the value or values that indicate a 'good' value. Other values returned by 'CHECK' will be 'bad' and throw an error.

what

(string) a string to display in the informative message.

...

further arguments passed on to function 'CHECK'.

Value

If all tests pass, returns NULL invisibly. Otherwise, an 'assertError' is thrown.


google/GeoexperimentsResearch documentation built on May 17, 2019, 7:42 a.m.