Re: [Rd] rank(, ties.method="last")

2015-10-20 Thread Suharto Anggono Suharto Anggono via R-devel
Marius Hofert-4-- > 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 righ

Re: [Rd] Conditional importFrom (roxygen?)

2015-10-20 Thread Hadley Wickham
>> This has been submitted as an issue at >> >> https://github.com/klutometis/roxygen/issues/378 >> >> closely related: >> >> https://github.com/klutometis/roxygen/issues/371 >> >> my current hacky solution to this is to use a Makefile that >> post-processes the NAMESPACE after it's roxygenized, e.

Re: [Rd] rank(, ties.method="last")

2015-10-20 Thread Marius Hofert
On Tue, Oct 20, 2015 at 10:26 AM, Henric Winell 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

Re: [Rd] rank(, ties.method="last")

2015-10-20 Thread Henric Winell
Den 2015-10-09 kl. 12:14, skrev Martin Maechler: I ran into a problem where I actually need rank(, ties.method="last"). It would be great to have this feature in base and it's also simple to get (see below). Thanks & cheers, Marius rank2 <- function (x, na.last = TRUE, ties.method = c("a