Function for checking if an object is of a specific type or class.
Usage
check_class_and_type(
object,
object_name = NULL,
type_classes = "bool",
allow_NULL = FALSE,
min = NULL,
max = NULL,
allowed_values = NULL
)Arguments
- object
Any R object.
- object_name
stringName of the object. This is helpful for debugging.- type_classes
vectorofstrings containing the type or classes which the object should belong to.- allow_NULL
boolIfTRUEallow the object to beNULL.- min
doubleorintMinimal value for the object.- max
doubleorintMaximal value for the object.- allowed_values
vectorofstrings determining the allowed values. If all strings are allowed set this argument toNULL.
Note
parameter min, max, and allowed_values do not apply if type_classes is a class.
allowed_values does only apply if type_classes is string.
See also
Other Utils Checks Developers:
check_all_args()