hmm, that is what I was afraid of. I considered that but thought to myself,
surely there must be an easier way.  I wonder why this feature isn't
available. It's there in scripting languages, like perl, but also in
"hardcore" languages like C++ where std::sort and sorted containers allow
the user to provide a comparison function (even for builtin types like int).
It's hard to believe that you have to jump through more hoops to do a custom
sort in R than in C++ ...


You put a class on the vector...

-- 
View this message in context: 
http://www.nabble.com/custom-sort--tp23770565p23770964.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to