Logical Sum and Product

DESCRIPTION:

Gives a single logical value that is a function of the logical values that are input.

USAGE:

all(..., na.rm=F) 
any(..., na.rm=F) 

REQUIRED ARGUMENTS:

...
any number of arguments, each capable of being coerced to mode logical. Missing values (NA) are allowed.

OPTIONAL ARGUMENTS:

na.rm=
logical flag: should missing values be removed before computation? This must be specified in the na.rm=value form.

VALUE:

a logical value:

all evaluates to TRUE if all the elements of all the arguments are TRUE. It is FALSE if there are any FALSEs. In all other cases (mixtures of NA and TRUE) the result is NA. If all the arguments are of length 0, all returns TRUE.

any evaluates to TRUE if any of the elements of any of the arguments is TRUE. It is FALSE if all the elements are FALSE. In all other cases (mixtures of NA and FALSE) the result is NA. If all the arguments are of length 0, any returns FALSE.

DETAILS:

These functions are members of the Summary group of generic functions.

SEE ALSO:

.

EXAMPLES:

if(all(x>0)) x <- sqrt(x)