powered by
Check if the provided object is of certain type
isOfType(object, type, nullAllowed = FALSE)
An object or an atomic vector or a list of objects.
A single string or a vector of string representation or class of the type that should be checked for.
Boolean flag if NULL is accepted for the object. If TRUE, NULL always returns TRUE, otherwise NULL returns FALSE. Default is FALSE.
NULL
object
TRUE
FALSE
TRUE if the object or all objects inside the list are of the given type.
# NOT RUN { # checking type of a single object df <- data.frame(x = c(1, 2, 3)) isOfType(df, "data.frame") # }
Run the code above in your browser using DataLab