Skip to contents

Check if class is in a set of accepted classes

Usage

checkClass(x, classesExpected = "list", argName = NULL)

Arguments

x

any object

classesExpected

character: vector with accepted classes

argName

character: name of argument displayed in error message

Examples

ReSources:::checkClass(c(1, 2, 3), c("numeric", "integer"))
if (FALSE) {
ReSources:::checkClass("This is not a list", argName = "x")
}