assert_length | R Documentation |
Assert object has a specific length
assert_length(
x,
length,
msg = NULL,
call = rlang::caller_env(),
arg_name = NULL
)
x |
object to check length of |
length |
expected length (number) |
msg |
custom error message |
call |
(logical) whether to preserve call in error message |
arg_name |
(character) name of argument being tested |
invisible(TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.