[R] rank() vs SAS proc rank

Gabor Grothendieck ggrothendieck at myway.com
Tue Mar 30 23:02:58 CEST 2004


 <White.Denis <at> epamail.epa.gov> writes:

> SAS proc rank has ties options of high and low that would allow
> rank (c(1,1,2,2,2,2,3)) == 1 1 3 3 3 3 7
> Could R support these ties.methods?

Don't know how SAS works but for your vector:

> z <- c(1,1,2,2,2,2,3)
> match(z,z)
[1] 1 1 3 3 3 3 7




More information about the R-help mailing list