validator: Define validation rules for data

View source: R/validator.R

validatorR Documentation

Define validation rules for data

Description

Define validation rules for data

Usage

validator(..., .file, .data)

Arguments

...

A comma-separated list of validating expressions

.file

(optional) A character vector of file locations (see also the section on file parsing in the syntax help file).

.data

(optional) A data.frame with columns "rule", "name", and "description"

Value

An object of class validator (see validator-class).

Validating expressions

Each validating expression should evaluate to a logical. Allowed syntax of the expression is described in syntax.

See Also

Other validator-methods: +,validator,validator-method, plot,validator-method

Examples


v <- validator(
  height>0
  ,weight>0
  ,height < 1.5*mean(height)
)
cf <- confront(women, v)
summary(cf)


validate documentation built on March 24, 2022, 5:07 p.m.