Dear list,

    I have two martix like these, each rows with name in the matrix. 

    I try to select rows with identical name from two matrix and calculate 
their correlation.

Matrix1:
2-Sep    9     5.5    1     7.18     10.0    8     139.45
2-Sep    7     4.9    15   8.22     61.68  9     123.62
4-Sep
5-Sep
AAMP
A2M
A2M
.
.
.

Matrix2:

2-Sep     4     7    1     6.8     12    8      19.4
2-Sep      2    8    15   2.2     6.8   12     13.2
4-Sep
AAMP
AAMP
ABCA5
A2M
A2M

I try to select rows with identical name from two matrix and calculate their 
correlation.

However, I got trouble when loading these two matrix into R as header=TRUE. 

So I use header=FLASE and these name become character in the first column.  

How do I extract the first column of matrix 1 and compare to the first column 
of matrix 2?

And if they are identical I compute their correlation?


SIncerely yours,
Chiahsin Liu

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to