recTests-generic: Tools for checking records in a data frame

Description Usage Arguments Details Value See Also

Description

These functions check for records in a data frame that some required property.

Usage

1
2
3
4
5
6
7
recTest_Missing(x, v)

recTest_CorrectCodes(x, v, cc)

recTest_InRange(x, v, lower, upper)

recTest_LessOrEqual(x, v1, v2)

Arguments

x

the data frame where to check

v

a character vector giving full variable names

cc

a vector of correct (permissible) codes for variable v

lower,upper

smallest/largest permissible value for variable v

v1,v2

variable names

Details

These are tools for checking with records in a data frame have a required property (not missing, specified values etc.) Record test of this type are usually run after running basic tests on variables as well as generic pre-processing to adjuts data formats. The output allows both a top-level summary of how many records pass a series of record tests, as well as identification of the records that fail one or more of the required tests.

The data frame is the first argument, to permit simple use of the pipe-operator.

Value

An object of class recTest.

See Also

dplyr::'%>%' varTests-generic


alexploner/R.HDSS documentation built on May 12, 2019, 2:32 a.m.