Skip to content
Prev 177052 / 398503 Next

matrix merge problem

Hi Juan,

Your first question can be answered easily.

bin.matrix = matrix(A %in% B,nrow(A),ncol(A)) ;
bin.vector = rowSums(bin.matrix) > 0 ;
C = A[bin.vector,] ;

This should do the trick.

Cheers,

Luc
Juan Pablo Fededa wrote: