Is suitable to be used as an if condition
1 2 3
Input to check.
How severe should the consequences of the assertion be?
Not intended to be used directly.
TRUE if the input is
if will try to do the right thing if you pass it a number
or a string, but this function assumes you want to do the right thing
and pass either
FALSE, maybe with some attributes.
1 2 3 4 5 6 7 8 9
is_if_condition(TRUE) is_if_condition(FALSE) is_if_condition(NA) is_if_condition(c(TRUE, FALSE)) is_if_condition("the truth") # You can pass a number as a logical condition, but you shouldn't, # so the next line returns FALSE. is_if_condition(1) assertive.base::dont_stop(assert_is_if_condition(raw(1)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.