
Last chance! 50% off unlimited learning
Sale ends in
any(..., na.rm = FALSE)
NA
values are removed before
the result is computed.x
denote the concatenation of all the logical vectors in
...
(after coercion), after removing NA
s if requested by
na.rm = TRUE
.The value returned is TRUE
if at least one of the values in
x
is TRUE
, and FALSE
if all of the values in
x
are FALSE
(including if there are no values). Otherwise
the value is NA
(which can only occur if na.rm = FALSE
and ...
contains no TRUE
values and at least one
NA
value).
Summary
group generic. Methods for it must use the signature
x, ..., na.rm
.Summary
group generic.
For this to work properly, the arguments ...
should be
unnamed, and dispatch is on the first argument.Coercion of types other than integer (raw, double, complex, character, list) gives a warning as this is often unintentional.
This is a primitive function.
all
, the ‘complement’ of any
.
range(x <- sort(round(stats::rnorm(10) - 1.2, 1)))
if(any(x < 0)) cat("x contains negative values\n")
Run the code above in your browser using DataLab