RANKS gives the rank of each element in a vector.
 This program uses an advanced algorithm with averge effort O(m.n.log(n)) 
 NaN in the input yields NaN in the output.
 
 r = ranks(X[,DIM])
   if X is a vector, return the vector of ranks of X adjusted for ties.
   if X is matrix, the rank is calculated along dimension DIM. 
   if DIM is zero or empty, the lowest dimension with more then 1 element is used. 
 r = ranks(X,DIM,'traditional')
   implements the traditional algorithm with O(n^2) computational 
   and O(n^2) memory effort
 r = ranks(X,DIM,'mtraditional')
   implements the traditional algorithm with O(n^2) computational 
   and O(n) memory effort
 r = ranks(X,DIM,'advanced   ')
   implements an advanced algorithm with O(n*log(n)) computational 
   and O(n.log(n)) memory effort
 r = ranks(X,DIM,'advanced-ties')
   implements an advanced algorithm with O(n*log(n)) computational 
   and O(n.log(n)) memory effort
   but without correction for ties 
   This is the fastest algorithm 

 see also: CORRCOEF, SPEARMAN, RANKCORR

 REFERENCES:
 --

Package: nan