Check Data Types
assert_type(x, expected)assert_scalar(x, expected)
assert_function(x)
Throws an error, if any, and returns x invisibly otherwise.
An object to be checked.
A character string specifying the expected
type. It must be one of "list", "atomic", "vector", "numeric",
"integer", "double", "character" or "logical".
N. Frerebeau
Other validation methods:
check-attribute,
check-data,
check-matrix,
check-numeric-comparison,
check-numeric-trend,
check-numeric,
needs(),
validate()