Matrix where each row contains ranks of the column values.
Syntax: @rowranks(m[, o, t])
m: matrix, vector
o: (optional) string
t: (optional) string
Return: matrix, vector
Returns a matrix where each row contains the rankings of the values of the corresponding row 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., @rowranks(x, "a", "i")).
Examples
= @rowranks(m1, "d")
returns a matrix whose i-th row ranks the elements in the i-th row of M1 so that the largest element in said row has a rank of 1.
Cross-references
See also
@ranks and
@colranks.