is_relistable: Is the input relistable?

Description Usage Arguments Value See Also Examples

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

Description

Checks to see if the input is relistable.

Usage

1
2
3
assert_is_relistable(x, severity = getOption("assertive.severity", "stop"))

is_relistable(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_relistable wraps is.relistable, providing more information on failure. The assert_* functions return nothing but throws an error if the corresponding is_* function returns FALSE.

See Also

is.relistable and is_scalar.

Examples

1
2
3
assert_is_relistable(as.relistable(list(1,2,3)))
#These examples should fail.
assertive.base::dont_stop(assert_is_relistable(list(1,2,3)))

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