Re: [R] exclude matrix from matrix

2011-08-06 Thread R. Michael Weylandt
If you know the names will always work (i.e., names of y are always names of x and the rows always have names) this should do it: x[!(rownames(x) %in% rownames(y)),] I.e., those rows of x such that their names are NOT included in the row names of y. Hope this helps, Michael Weylandt On Sat, Au

[R] exclude matrix from matrix

2011-08-06 Thread Henning Jensen
Dear List, I am a beginner of R and have an easy question, which I couldn’t find out. I like to exclude all rows of matrix “y” from matrix ”x” (like a subset of “x”, without “y”). The matrix “x” is of the structure >str(x) num [1:346, 1:8] 0.055 0.6833 0.9121 0.0819 0.1223 ... - attr(*