Skip to content
Prev 51186 / 63424 Next

rank(, ties.method="last")

Den 2015-10-09 kl. 12:14, skrev Martin Maechler:
I think so: the code above doesn't seem to do the right thing.  Consider 
the following example:

 > x <- c(1, 1, 2, 3)
 > rank2(x, ties.method = "last")
[1] 1 2 4 3

That doesn't look right to me -- I had expected

 > rev(sort.list(x, decreasing = TRUE))
[1] 2 1 3 4


Henric Winell