[R] intersect() question
Andrej Kastrin
andrej.kastrin at siol.net
Sat Jul 15 21:03:40 CEST 2006
Hi,
I have a matrix containing ID numbers in each column. I would like to
program function which calculate common number of ID numbers between
each pair of columns.
Suppose:
5 6 7
1 5 3
6 7 2
Then the result should be:
0 2 0
2 0 1
0 1 0
The main problem is how to implement intersect() function to walk
through each pair of columns and write result to result matrix.
Thanks in advance for any suggestion, Andrej
More information about the R-help
mailing list