checkTRUE | R Documentation |
Simply checks if an argument is TRUE
.
checkTRUE(x, na.ok = FALSE)
check_true(x, na.ok = FALSE)
assertTRUE(x, na.ok = FALSE, .var.name = vname(x), add = NULL)
assert_true(x, na.ok = FALSE, .var.name = vname(x), add = NULL)
testTRUE(x, na.ok = FALSE)
test_true(x, na.ok = FALSE)
x |
[any] |
na.ok |
[ |
.var.name |
[ |
add |
[ |
Depending on the function prefix:
If the check is successful, the functions
assertTRUE.
/assert_true.
return
x
invisibly, whereas
checkTRUE.
/check_true.
and
testTRUE.
/test_true.
return
TRUE
.
If the check is not successful,
assertTRUE.
/assert_true.
throws an error message,
testTRUE.
/test_true.
returns FALSE
,
and checkTRUE.
/check_true.
return a string with the error message.
The function expect_true.
always returns an
expectation
.
testTRUE(TRUE)
testTRUE(FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.