Ranks of each column of the matrix.
Syntax: @colranks(m[, o, t])
m: matrix, vector
o: (optional) string
t: (optional) string
Return: matrix, vector
Returns a matrix where each column contains the ranks of the values of the corresponding column of m.
The o option controls the direction of the ranking:
• “a” (ascending - default) or “d” (descending).
The t option controls tie-handling:
• Ties are broken according to the setting of t: “i” (ignore), “f” (first), “l” (last), “a” (average - default), “r” randomize.
If you wish to specify tie-handling options, you must also specify the order option (e.g., @colranks(x, "a", "i")).
Examples
= @colranks(m1, "d")
returns a matrix whose i-th column ranks the elements in the i-th column of M1 so that the largest element in said column has a rank of 1.
Cross-references
See also
@ranks and
@rowranks.