check_operators | R Documentation |
Logical AND and OR operators for check_*
-functions from checkmate
.
lhs %check&&% rhs
lhs %check||% rhs
lhs , rhs |
( |
Either TRUE
or a character(1)
.
library(checkmate)
x = c(0, 1, 2, 3)
check_numeric(x) %check&&% check_names(names(x), "unnamed") # is TRUE
check_numeric(x) %check&&% check_true(all(x < 0)) # fails
check_numeric(x) %check||% check_character(x) # is TRUE
check_number(x) %check||% check_flag(x) # fails
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.