Skip to content

rank_eq

Rank of a value (ties get the same rank).

v = rank_eq(number, ref, order)

Returns the rank of number among the values in ref. With order = 0 (default), ranks descending (highest = 1); with order = 1, ascending. Tied values get the same rank, with subsequent ranks skipping the appropriate count.

rank_eq(7, [3 5 7 7 9]) % 2
  • rank_avg — Rank of a value (ties get the average of the ranks).
  • large — K-th largest value in an array.
  • small — K-th smallest value in an array.