anyFalse | R Documentation |
any(!(...))
any_false(...)
returns TRUE
if anything in ...
is FALSE
; it's the opposite of
any(...)
, which returns TRUE
if anything in ...
is TRUE
.
anyFalse(..., na.rm = FALSE)
... |
(Vectors) Zero or more logical vectors. |
na.rm |
(Logical) If |
This function exists to avoid confusion when negating any()
;
any(!c(TRUE, FALSE)) == TRUE
, but !any(c(TRUE, FALSE)) == FALSE
, and the difference
is which part of the expression you negate. In many cases, you want the former because
you are testing whether anything in the vector is FALSE
, and that's what this
function does.
Logical vector.
Desi Quintans (http://www.desiquintans.com)
anyFalse(c(TRUE, TRUE))
#> [1] FALSE
anyFalse(c(FALSE, FALSE))
#> [1] TRUE
anyFalse(c(TRUE, FALSE))
#> [1] TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.