R StatisticsLesson 31Free preview
R Max and Min
This lesson is part of R · All levels
Summary
This lesson discusses the search for the lowest and highest extreme values in a dataset using the functions min(), max(), which are often used in preprocessing statistical data. In addition, the functions which.min() and which.max() were introduced to track the row number or position index where such extreme values occur.
Key points
- The 'min()' function returns the smallest numerical value in a data set
- The 'max()' function returns the largest numerical value in a data set
- The 'which.min() ' function returns the index number of the element with the minimum value
- The 'which.max() ' function returns the index number of the maximum value element
- Use 'na.rm = TRUE' if the data potentially contains missing values
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.