order() with na.last=NA ignores decreasing=TRUE (PR#1906)
oehl_list@gmx.de
oehl_list@gmx.de
Tue, 13 Aug 2002 22:43:42 +0200 (MET DST)
Please find replication code below
Best
Jens Oehlschlägel
> x <- c(NA, 1, 2, 3)
> order(x, na.last=TRUE, decreasing=FALSE)
[1] 2 3 4 1
> order(x, na.last=TRUE, decreasing=TRUE)
[1] 4 3 2 1
> order(x, na.last=FALSE, decreasing=FALSE)
[1] 1 2 3 4
> order(x, na.last=FALSE, decreasing=TRUE)
[1] 1 4 3 2
> order(x, na.last=NA, decreasing=FALSE)
[1] 2 3 4
> # THIS ONE IS FALSE: order() with na.last=NA ignores decreasing=TRUE
> order(x, na.last=NA, decreasing=TRUE)
[1] 2 3 4
>
x <- c(NA, 1, 2, 3)
order(x, na.last=TRUE, decreasing=FALSE)
order(x, na.last=TRUE, decreasing=TRUE)
order(x, na.last=FALSE, decreasing=FALSE)
order(x, na.last=FALSE, decreasing=TRUE)
order(x, na.last=NA, decreasing=FALSE)
# THIS ONE IS FALSE: order() with na.last=NA ignores decreasing=TRUE
order(x, na.last=NA, decreasing=TRUE)
> version
_
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 1
minor 5.1
year 2002
month 06
day 17
language R
--
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._