| assert_is_formula {assertive.types} | R Documentation |
Checks to see if the input is a formula.
assert_is_formula(x, severity = getOption("assertive.severity", "stop"))
assert_is_one_sided_formula(x, severity = getOption("assertive.severity",
"stop"))
assert_is_two_sided_formula(x, severity = getOption("assertive.severity",
"stop"))
is_formula(x, .xname = get_name_in_parent(x))
is_one_sided_formula(x, .xname = get_name_in_parent(x))
is_two_sided_formula(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. |
The is_* functions return TRUE when the input is a
formula. The assert_* functions return nothing but throw an error
if the corresponding is_* function returns FALSE.
is_environment and is_language
is_one_sided_formula(~ x) is_two_sided_formula(y ~ x)