This function can be used to validate the input to functions. This function is not exported.
validate(
x,
name = NULL,
check_class = NULL,
check_mode = NULL,
check_integer = FALSE,
check_NA = TRUE,
check_infinite = TRUE,
check_length = NULL,
check_dim = NULL,
check_range = NULL,
check_cols = NULL
)
Function input.
Character. Name of variable to validate; if NULL
variable name of object supplied to x
is used.
Character. Name of class to expect.
Character. Name of mode to expect.
Logical. If TRUE
an object of type integer
or a whole number numeric
is expected.
Logical. If TRUE
an non-NA
object is expected.
Logical. If TRUE
a finite object is expected.
Integer. Length of the object to expect.
Numeric. Vector of object dimensions to expect.
Numeric. Vector of length 2 defining the expected range of the object.
Character. Vector of columns that are intended to be in a data.frame
.