On Tue, 30 Mar 2004 [EMAIL PROTECTED] wrote:

> SAS proc rank has ties options of high and low that would allow
> producing ranks of the type found in the sports pages, e.g.,
> 
> rank (c(1,1,2,2,2,2,3)) == 1 1 3 3 3 3 7
> 
> Could R support these ties.methods?

Yes, it is possible to program them in R.  Here is one way:

1 + rowSums(outer(x, x, ">"))

which at least generalizes your single unexplained example.

-- 
Brian D. Ripley,                  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to