List-func
This function returns the index number in vd where val first occurs. If there is no match, the function returns 0. Note that this function makes an "exact" comparison using the equal (==) operator.
int list(double val, dataset vd)
val
vd
Returns the index number in vd where val first occurs.
Example 1
The following function tests whether or not the value 3 exists in column A. If the value exists, variable aa will be the row index of this value. If not, variable aa will be zero.
aa = list(3, col(A)); aa = ;
Example 2
The following script finds the row index of the minimum value in column A.
stats col(A); aa = list(stats.min, col(A)); aa = ;