powered by
Returns the Nth highest or lowest values in a vector
nth.values(x, N = 2, smallest = FALSE)
Numeric vector of Nth values
Numeric vector
Number of (Nth) values returned
(FALSE/TRUE) Return the highest, else smallest values
Jeffrey S. Evans <jeffrey_evans@tnc.org>
This function returns n lowest or highest elements in a vector
nth.values(1:20, N=3, smallest = TRUE) nth.values(1:20, N=3)
Run the code above in your browser using DataLab