Re: [R] Reordering inputs

2011-05-12 Thread Steven Kennedy
On Fri, May 13, 2011 at 1:31 AM, Dat Mai wrote: > Yes, but I want to make it so that 2 different square matrices to both have > the same order for the x and y axis while, at the same time, the x and y > axis having variables in the same order as well: > >   a   b   c d   e 

Re: [R] Reordering inputs

2011-05-11 Thread Steven Kennedy
You can order each matrix by any column you choose like: a<-matrix(rnorm(20),ncol=2) > a[order(a[,1]),] #orders by column 1 [,1] [,2] [1,] -1.86523489 -1.6920270 [2,] -0.94488744 0.2815087 [3,] 0.02380494 0.2491136 [4,] 0.37295795 0.8156993 [5,] 0.55533366 -0.7053233

Re: [R] Reordering inputs

2011-05-11 Thread Carl Witthoft
Matrices just *are* . They don't have inputs or outputs. Can you provide an example of what you are trying to do? From: Dat Mai Date: Wed, 11 May 2011 19:43:23 + Hello All, I have 2 matrices consisting of the same inputs, but having different outputs. I created a heatmap for both of

[R] Reordering inputs

2011-05-11 Thread Dat Mai
Hello All, I have 2 matrices consisting of the same inputs, but having different outputs. I created a heatmap for both of them; the point is to compare them side by side. The best way to organize the inputs is to make sure that the order of the inputs are the same for both heatmaps. How would I go