Library: | xplore |
See also: | rank sort order |
Quantlet: | maxrank | |
Description: | computes the rank vector of a given vector. |
Usage: | r = maxrank (x) | |
Input: | ||
x | n x 1 vector, data | |
Output: | ||
r | n x 1 vector, ranks |
library("xplore") x = #(4,1,6,5,4) maxrank(x)
Contents of r [1,] 3 [2,] 1 [3,] 5 [4,] 4 [5,] 3