searchK
Syntax
searchK(X, k)
Details
Return the k-th smallest item ignoring null values.
Parameters
X is a vector.
k is an integer indicating the k-th smallest item.
Returns
A scalar with the same data type as X.
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
