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

Description Usage Arguments Value See Also Examples

View source: R/is-type-methods.R

Description

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

Usage

1
2
3
4
5
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

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

assertive.types documentation built on May 1, 2019, 10:31 p.m.