Check for Object Type Mismatch
Details
This function is used to check the object type of an input value based on
base R package. In base R package, object type functions are
specified in is.ObjectType format. For instance, base::is.logical
is used for checking a logical/Boolean value. Please see the examples how it
is translated in this function.
See also
Other checks function:
check_colnames(),
check_duplicate_records(),
check_non_missing_value(),
check_value_match(),
detect_decimal_value(),
detect_numeric_value(),
is_datadict_tbl()
Examples
if (FALSE) { # \dontrun{
check_object_type(x = letters[1:12], type = "character")
check_object_type(x = ADNIMERGE2::CDR, type = "data.frame")
check_object_type(x = TRUE, type = "logical")
# Error message
check_object_type(x = letters[1:12], type = "numeric")
check_object_type(x = letters[1:12], type = "factor")
} # }
