which.maxn:
Where are the n largest or n smallest elements in a numeric vector ?
Description
Determines the locations, i.e., indices of the n largest or n smallest
elements of a numeric vector.
Usage
which.maxn(x, n = 1)
which.minn(x, n = 1)
Arguments
x
numeric vector
n
integer >= 1
Value
A vector of length at most n with the indices of the n largest /
smaller elements. NAs are discared and that can cause the vector to be
smaller than n.