assert_all_are_classes {assertive.types}R Documentation

Is the input the name of a (formally defined) class?

Description

Checks to see if the input is the name of a (formally defined) class.

Usage

assert_all_are_classes(x, severity = getOption("assertive.severity", "stop"))

assert_any_are_classes(x, severity = getOption("assertive.severity", "stop"))

is_class(x, .xname = get_name_in_parent(x))

Arguments

x

Input to check.

severity

How severe should the consequences of the assertion be? Either "stop", "warning", "message", or "none".

.xname

Not intended to be used directly.

Value

is_class is a vectorised wrapper for isClass. assert_is_class returns nothing but throws an error if is_class returns FALSE.

See Also

isClass.

Examples

assert_all_are_classes(c("lm", "numeric"))

[Package assertive.types version 0.0-3 Index]