Description Usage Arguments Value See Also Examples
Checks to see if the input is an factor.
1 2 3 4 5 6 7 | assert_is_factor(x, severity = getOption("assertive.severity", "stop"))
assert_is_ordered(x, severity = getOption("assertive.severity", "stop"))
is_factor(x, .xname = get_name_in_parent(x))
is_ordered(x, .xname = get_name_in_parent(x))
|
x |
Input to check. |
severity |
How severe should the consequences of the assertion be?
Either |
.xname |
Not intended to be used directly. |
is_factor
wraps is.factor
, providing more
information on failure. assert_is_factor
returns nothing
but throws an error if is_factor
returns FALSE
.
1 | assert_is_factor(factor(sample(letters, 10)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.