Skip to content
Prev 175250 / 398502 Next

Sorting problem

Bill.Venables at csiro.au wrote:
More generally, the xtfrm() function converts a vector into a numeric 
one that sorts in the same order.  It will work on character columns as 
well:

BA[order(BA[, 1], -xtfrm(BA[,2]), ]

Duncan Murdoch