Skip to content
Prev 307763 / 398506 Next

rank() not doing really what I want

If they are already in decreasing order, you might be able to work
something out like (untested):

cumsum(c(1, diff(x) < 0))

Cheers,
Michael

On Fri, Oct 12, 2012 at 8:05 AM, Henri-Paul Indiogine
<hindiogine at gmail.com> wrote: