RANKS
Syntax | Return Value | Arguments | Keywords | Examples | Version History | See Also
The RANKS function computes the magnitude-based ranks of a sample population X. Elements of identical magnitude "ties" are ranked according to the mean of the ranks that would otherwise be assigned.
This routine is written in the IDL language. Its source code can be found in the file ranks.pro in the lib subdirectory of the IDL distribution.
Syntax
Result = RANKS(X)
Return Value
The result is a vector of ranks equal in length to X.
Arguments
X
An n-element integer, single-, or double-precision floating-point vector. The elements of this vector must be in ascending order based on their magnitude.
Keywords
None.
Examples
IDL prints:
-2.30 1.00 -1.30 2.00 -0.80 3.00 -0.70 4.00 -0.60 5.00 -0.30 6.50 -0.30 6.50 -0.20 8.50 -0.20 8.50 -0.10 10.00 0.10 11.00 0.20 12.00 0.30 13.00 0.40 14.00 0.60 15.50 0.60 15.50 1.10 18.50 1.10 18.50 1.10 18.50 1.10 18.50
Version History