check_length | R Documentation |
Two vectors are of compatible size if and only if:
At least one vector has size 1
or both vectors are of the same size.
check_length(x, len)
assert_length(x, len, .var.name = checkmate::vname(x), add = NULL)
test_length(x, len)
x |
( |
len |
( |
.var.name |
[ |
add |
[ |
TRUE
if successful, otherwise a string with the error message.
assertions
for more details.
check_length(1:5, 1)
check_length(1:5, 6)
check_length(1:5, 5)
check_length(10, 1)
check_length(10, 9)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.