Dear R Community,

The following seems like a simple problem, but I've been stuck on it for
some time, with no luck using matching or subsetting functions.  I'm trying
to remove the rows from a large matrix that match rows in another large
matrix.  A (small scale) example:

col1<-c("A", "B", "C", "D")
col2<-c("A", "B", "C", "D")
m1<-cbind(col1, col2)
col3<-c("B", "C", "D")
col4<-c("B", "C", "z")
m2<-cbind(col3, col4)

Any ideas on how to get the following matrix?
     [,1] [,2]
[1,] "A"  "A" 
[2,] "D"  "D" 

Thanks very much in advance,
Ray


        [[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