least.k: Functions to find the few smallest elements in a vector.
Description
Given a numeric vector, these functions compute and return the few
smallest elements in it. The number of elements returned is specified as
either a definite number (k) or as a proportion of the vector
length (p). The variant functions (which.*), accomplish
the same task, but return instead the position of such elements in the vector.
The number of smallest elements sought, specified as proportion of the length of x.
Value
Details
These functions are used internally in the determination of nearest neighbours; the user need not call any of these functions directly. Rather, the choice is specified via the arguments k and p.