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