[R] Extract subset of rows
another83 at me.com
Fri Dec 17 16:22:44 CET 2010
Sorry i forgot to mention there a species present in one matrix not in the other hence the problem i.e matrix 1 may have species E which isnt present in matrix 2 and matrix 2 may have species F not present in matrix 1.
Sorry for the lack of clarification in the original post!
On 17 Dec 2010, at 15:19, John Haart wrote:
I have two matrices with a common field = species what i want to do is make a matrix that combines the data held in the other two based on the species name.
I.e ( simple example)
Matrix 1 - monocot
Matrix 2 - PCAresults
matrix 3 - What i want
SPECIES V1 V2
A 2 0.2
B 3 0.3
C 4 4.1
D 5 3.2
my attempt has been this
But this returns matrix with only those found in each but doesn't "import" the data from PCAresults
Any help would be greatly appreciated
R-help at r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
More information about the R-help