Skip to content
Prev 199753 / 398502 Next

Comparison of vectors in a matrix

Hi,

I have a matrix with two columns, and the elements of the matrix are
vectors.

So for example, in line 3 of column 1 I have a vector v31=("marc", "robert,
"marie").

What I need to do is to compare all vectors in column 1 and 2, so as to get,
for example setdiff(v31,v32) into a new column.

Is there a way to do this in R?

Thanks!