Order data matrix as in other data matrix
|Added at||2016-12-26 13:12|
I have 3 very big data matrices (where row names are chemical compounds and column names are treatments). They contain other values (1st: absolute concentrations, 2nd p-values, 3rd: asterisks) but they are not ordered in the same way. I have to order them all the same (rows and columns) because data.frame2 and 3 have to be superimposed on a heat map made from data.frame 1.
I tried to use sort function but I want to order the 2nd and 3rd data frame as in the 1st one.
I have to find something that works as:
The dimensions are the same and also row and column names are the same as I used:
To be sure.
PS: it is almost impossible to list all rownames or column names our use their indices because they are (like I said) very big dataframes.