From marius.hofert at uwaterloo.ca  Tue Oct 20 16:46:13 2015
From: marius.hofert at uwaterloo.ca (Marius Hofert)
Date: Tue, 20 Oct 2015 10:46:13 -0400
Subject: [Rd] rank(, ties.method="last")
In-Reply-To: <9fb44acc43d54762ae2f0795872d4881@CONNHUB1.connect.uwaterloo.ca>
References: <CAM3-KjZ=d1a4sUFckw83RZu-phZffY7KvZeQ1WtAjNB6ysoeJw@mail.gmail.com>
	<22039.37791.6045.955899@stat.math.ethz.ch>
	<9fb44acc43d54762ae2f0795872d4881@CONNHUB1.connect.uwaterloo.ca>
Message-ID: <CAM3-KjY5+Luf5Jp_9Os_UXuJgdCZ+CqE1Wh+4BYPtyp+JKDzxQ@mail.gmail.com>

On Tue, Oct 20, 2015 at 10:26 AM, Henric Winell
<nilsson.henric at gmail.com> wrote:
> 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
>

Indeed, well spotted, that seems to be correct.

>
> Henric Winell
>



[Rd] rank(, ties.method="last")
Marius Hofert