order: Implement the sort and order methods for
data.frame and matrix, sorting it in
lexicographic order.
Description
These function return a data frame sorted in lexcographic order or a
permutation that will rearrange it into lexicographic order: first by the
first column, ties broken by the second, remaining ties by the third, etc..
For sort, a data frame, sorted lexicographically. For
order, a permutation I (of a vector 1:nrow(x)) such
that x[I,,drop=FALSE] equals x ordered lexicographically.