TITLE(All @@ Are All / Any Values True?)
USAGE(
all(x)
any(x)
)
ALIAS(any)
ALIAS(all)
VALUE(
Given a single logical argument, LANG(all) returns a
logical value indicating whether or not all of the elements of
LANG(x) are LANG(TRUE).
The value returned is LANG(TRUE) if all the values in LANG(x) are
LANG(TRUE), and LANG(FALSE) if any the values in LANG(x) are
LANG(FALSE).  If LANG(x) consists of a mix of LANG(TRUE) and
LANG(NA) values, then LANG(all) returns LANG(NA).
PARA
Given a single logical argument, LANG(any) returns a
logical value indicating whether or not any of the elements of
LANG(x) are LANG(TRUE).
The value returned is LANG(TRUE) if any the values in LANG(x) are
LANG(TRUE), and LANG(FALSE) if all the values in LANG(x) are
LANG(FALSE).  If LANG(x) consists of a mix of LANG(FALSE) and
LANG(NA) values, then LANG(any) returns LANG(NA).
)
EXAMPLES(
range(x <- sort(round(rnorm(10) - 1.2,1)))
if(any(x < 0)) cat("x contains negative values\n")
if(all(x < 0)) cat("all x values are negative\n")
)
