Displaying 1 result from an estimated 1 matches for "lexicographical_order".
2008 Sep 30
1
ordering problem
Hi there!
        I need some assistance here with vector orderings. I have a set 
of q vectors of length p, grouped by rows in a matrix A, q?p, that I 
need to order lexicographically 
(http://en.wikipedia.org/wiki/Lexicographical_order).
        I also have another matrix B, p?r, and a vector c, that should 
be ordered according to the order of A. So far, I was doing
    ordering <-  apply(A, 2, order)[,1]
    A <- A[ordering,]
    B <- B[ordering,]
    c <- c[ordering]
        But now I realize that this way I'...