Skip to content
Prev 333256 / 398506 Next

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 function is used as indexes for the original sequence then the data will be sorted as desired. You may see the error of your ways more clearly if you use a vector of strings like c("b","a","c","d","e") instead of integer values.

Please configure your email client to send plain text to this list as the Posting Guide requests, as HTML messes up R code.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.
Hawthorne Beyer <h.beyer at uq.edu.au> wrote: