assert_has_terms

0th

Percentile

Does the input have terms?

Checks to see if the input has a terms component or attribute.

Usage
assert_has_terms(x, severity = getOption("assertive.severity", "stop"))

has_terms(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

has_terms returns TRUE if the input has an element or an attribute named terms. assert_has_terms returns nothing but throws an error if has_terms is not TRUE.

See Also

terms.

Aliases
  • assert_has_terms
  • has_terms
Examples
# NOT RUN {
model <- lm(uptake ~ conc, datasets::CO2)
# this works because model$terms is not null
assert_has_terms(model)
# }
Documentation reproduced from package assertive.models, version 0.0-2, License: GPL (>= 3)

Community examples

Looks like there are no examples yet.