14:38
To: Hawthorne Beyer; r-help@r-project.org
Subject: Re: [R] order() function, decreasing=TRUE unexpected behaviour
I think you are confused, and there is no problem with the order function. Keep
in mind that order returns the index values in a sequence such that when the
result of the order
I think you are confused, and there is no problem with the order function. Keep
in mind that order returns the index values in a sequence such that when the
result of the order function is used as indexes for the original sequence then
the data will be sorted as desired. You may see the error of
There appears to be an issue with the decreasing=TRUE option on the order()
function that indicates either a bug or perhaps a design flaw (potentially
flawed because I would suggest the majority of users would expect different
behaviour).
# demonstration of problem:
x <- c(2,1,3,4,5)
order(x)
o
3 matches
Mail list logo