assertions_and_primitives | R Documentation |
These are internal function for the developers of the package.
The assertions are build on top of sprintf()
to handle line breaks and
automate insertion of arguments.
assert(expr, error_msg = "ERROR", ..., warn = FALSE)
assert_is(x, class)
assert_is_one_of(x, classes)
assert_is_single_x(x, class)
assert_inherits(x, class)
assert_valid_option(x, options)
is_one_of(x, classes)
is_column_subset(df1, df2, interger_tolerance = TRUE, factor_tolerance = TRUE)
is_single_character(x)
is_single_logical(x)
is_single_numeric(x)
has_equal_elements(x)
has_distinct_elements(x)
none(..., na.rm = FALSE)
The assertions are called for their side effect, they raise warnings or errors
The primitives return TRUE
or FALSE
Lukas Dargel
## Not run:
assert(FALSE, "My %s error message!", "nice")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.