Returns the indices of the n smallest elements in a vector

smallest_n_indices(x, n = 1L)

Arguments

x

(numeric())
A numeric vector.

n

(numeric(1))
A integer indicating how many elements should be returned