This function computes the maximal value of a numeric, integer, logical, or complex vector. If the vector is not one of these types, the function returns either NA or the first entry of the vector.
# S3 method for numerics
max(x, na.rm = TRUE, non.numeric.value = "missing", ...)If x is numeric, integer, logical, or complex, the maximal value will be computed. Otherwise, the first value of x will be returned untouched or NA based on non.numeric.value.
A vector.
A logical value specifying whether missing values should be removed from the calculations specified by the function. Defaults to TRUE.
If "missing", returns NA for variables that are not numeric, integer, logical, or complex. Otherwise, returns the first entry of the vector. Defaults to "missing".
Additional arguments .