Re: [R] reorder a matrix

2012-04-26 Thread Jorge I Velez
See http://r.789695.n4.nabble.com/reorder-a-matrix-td4588839.html#a4588845 --JIV On Thu, Apr 26, 2012 at 10:31 PM, Rebecca <> wrote: > Hi, > Here are part of my data, > > > pr16.5 >origin dest ldco time.slot distortion > 1 111 14.3 > 2 111

[R] reorder a matrix

2012-04-26 Thread Rebecca
Hi, Here are part of my data, > pr16.5    origin dest ldco time.slot distortion 1   1    1    1 1    4.3 2   1    1    1 2    4.7 3   1    1    1     3    5.6 4   1    1    1 4    7.7 5   1    1    2 1    6.8 6  

Re: [R] reorder a matrix

2012-04-25 Thread Jorge I Velez
Like this? x <- structure(list(origin = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), dest = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), ldco = c(1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L,

[R] reorder a matrix

2012-04-25 Thread Rebecca
Hi, Here are part of my data, > pr16.5    origin dest ldco time.slot distortion 1   1    1    1 1    4.3 2   1    1    1 2    4.7 3   1    1    1     3    5.6 4   1    1    1 4    7.7 5   1    1    2 1    6.8 6