Re: [R] Sort matrix with duplicate row names alphabetically by rowname

2008-05-19 Thread Paul Geeleher
IL PROTECTED] > On Behalf Of Paul Geeleher > Sent: 19 May 2008 12:07 > To: r-help@r-project.org > Subject: [R] Sort matrix with duplicate row names alphabetically by > rowname > > Hi, > > I've a matrix that contains 4 replicates of each rowname. (4 a's, 4 b&#x

Re: [R] Sort matrix with duplicate row names alphabetically by rowname

2008-05-19 Thread john seers (IFR)
Try: mat <- mat[order(rownames(mat)), ] --- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Geeleher Sent: 19 May 2008 12:07 To: r-help@r-project.org Subject: [R] Sort matrix with duplicate row names alphabetically by rowname Hi, I&#

[R] Sort matrix with duplicate row names alphabetically by rowname

2008-05-19 Thread Paul Geeleher
Hi, I've a matrix that contains 4 replicates of each rowname. (4 a's, 4 b's, 4 c's in no particular order) Like this: # c 32 a 1 b 4 c 87 c 34 b 54 a 23 a 12 b 9 a 3 b 87 c 43 There are a couple of more columns but I'm using the above as an example I need to sort it so that the same rowna