searchK
Syntax
searchK(X, k)
Arguments
X is a vector.
k is an integer indicating the k-th smallest item.
Details
Return the k-th smallest item ignoring NULL values.
Examples
searchK(1 7 3 5 3 9 6 1 NULL, 1);
// output
1
searchK(1 7 3 5 3 9 6 1 NULL, 2);
// output
1
searchK(1 7 3 5 3 9 6 1 NULL, 3);
// output
3