Class definition for 'RAVE' variable constraints
Source:R/class-variable-constraint.R
RAVEVariableConstraints.Rd
See new_constraints
for constructor function.
Value
Initialized instance
Formatted characters
Either TRUE
if passed or a collection of assertion
failures (or errors)
TRUE
if valid, otherwise returns the error message
A list of constraint data that can be passed into
$restore
method
RAVEVariableConstraints
instance
Active bindings
n_validators
Number of validation functions
isRAVEVariableConstraints
always true
generator
class definition
Methods
Method new()
Constructor method
Usage
RAVEVariableConstraints$new(type = "UnboundedConstraint", assertions = NULL)
Method assert()
Validate the constraints
Usage
RAVEVariableConstraints$assert(
x,
.var.name = checkmate::vname(x),
on_error = c("error", "warning", "message", "muffle"),
env = parent.frame(),
data = NULL
)
Method check()
Check if the value is valid with no error raised
Usage
RAVEVariableConstraints$check(x, env = parent.frame(), data = NULL)