Extremes

DESCRIPTION:

Returns a number that is the maximum or minimum of the inputs.

USAGE:

max(..., na.rm = F) 
min(..., na.rm = F) 

REQUIRED ARGUMENTS:

...
any number of numeric arguments. 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= form.

VALUE:

the single maximum (or minimum) value found in the " ..." arguments.

DETAILS:

Any NAs in the data produce NA as a result unless na.rm = TRUE.

These are members of the group of generic functions.

NOTE:

pmax and pmin generate a vector of parallel extremes, and range computes both max and min.

SEE ALSO:

, , , .

EXAMPLES:

# create some sample objects 
x <- c(1, 2, 3) 
y <- c(4, 5, NA) 
min(na.rm = T, x, y) # returns 1 since na.rm = T 
min(x, y) # returns NA