max(), min(): Maxima and Minima

The function min is a widely used function to sum up the values in a vector, data.frame. An argument na.rm is used to ignore NA values when the vector has NA values.

The basic usage of max() and min() function is written in the exercise.

Instruction

Sepal.Length <- iris$Sepal.Length # See the first part of pre-defined length head(Sepal.Length) # Print the maximum value in length max(Sepal.Length) # Print the minimum value in length min(Sepal.Length)

Previous: 1-13 | sum(): Sum up values in a vector

Next: 1-15 | which(): Find an index under condition

Back to Main