Question: (Closed) Sorting a matrix rowname based on column of another matrix
gravatar for Duckula
23 months ago by
Duckula20 wrote:

Dear all, I have two matrices similar to below:

a b c d              id1 id2 id3 id4
1 2 3 4              b     1    2    3
6 7 8 9              c     0    2    4
                     d     1    2    2
                     a     5    6    8

And I want to sort the row name of the left matrix according to the first column (id1) of the second matrix. Does anyone has any suggestion that how can it be processed ? I was simply trying "first matrix"[colnames("second matrix"),]. but it was not that easy.


matrix R • 419 views
ADD COMMENTlink written 23 months ago by Duckula20

Hello Duckula!

We believe that this post does not fit the main topic of this site.

This is a pure R question. Please search StackExchange for an appropriate answer.

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.


ADD REPLYlink written 23 months ago by ATpoint38k
Please log in to add an answer.
The thread is closed. No new answers may be added.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1163 users visited in the last hour