not.inherits {quickcode}R Documentation

Not inherit from any of the classes specified

Description

Opposite of base::inherits(). Indicates whether its first argument inherits from any of the classes specified in the what argument. If which is TRUE then an integer vector of the same length as what is returned. Each element indicates the position in the class(x) matched by the element of what; zero indicates no match. If which is FALSE then TRUE is returned by inherits if any of the names in what match with any class.

Usage

not.inherits(x, what, which = FALSE)

Arguments

x

a R object

what

a character vector naming classes.

which

logical affecting return value: see ‘Details’.

Value

a boolean value to indicate if !inherits

Examples

keep.cols = "a character"
class(keep.cols) # class is character
not.inherits(keep.cols,"character")

num.var = 1L
class(num.var) # class is integer
not.inherits(num.var,"double")


[Package quickcode version 0.8 Index]