assert_names | R Documentation |
Performs assertions with various checks on character vectors, usually names.
assert_names(
x,
type = "named",
subset.of = NULL,
must.include = NULL,
permutation.of = NULL,
identical.to = NULL,
disjunct.from = NULL,
what = "names",
.var.name = checkmate::vname(x),
comment = NULL,
add = NULL
)
x |
[ |
type |
[character(1)]
Note that for zero-length |
subset.of |
[ |
must.include |
[ |
permutation.of |
[ |
identical.to |
[ |
disjunct.from |
[ |
what |
[ |
.var.name |
[ |
comment |
[ |
add |
[ |
The assertions are based on checkmate::checkNames
. NVIcheckmate::assert_names
differs from checkmate::assert_names
in including the argument comment =
. The help
is updated to reflect the changes.
If the check is successful, the function
assert_names
return x
invisibly.
If the check is not successful,
assert_names
throws an error message.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.