[R] matching type question, please

Erin Hodgess
Thu, 16 Dec 2021 20:17:39 -0000

Hello!

I have the following:

 cbind(xr1,xr2)

      xr1 xr2

 [1,]   8   0

 [2,]   7   1

 [3,]   6   2

 [4,]   5   3

 [5,]   4   4

 [6,]   3   5

 [7,]   2   6

 [8,]   1   7

 [9,]   0   8

> cbind(xs1,xs2)

     xs1 xs2

[1,]   9   4

[2,]   8   4

[3,]   7   4

[4,]   6   4

[5,]   5   4

[6,]   4   4

[7,]   3   4

>

These are ordered pairs.  I would like to get something that shows that the
pair (4,4) appears in both.  I have tried cbind with match and %in% and
intersect, but not getting the exact results.

Any suggestions would be appreciated.  I have a feeling that it's something
really easy that I'm just not seeing.

Thanks,
Erin


Erin Hodgess, PhD
mailto: erinm.hodgess at gmail.com

	[[alternative HTML version deleted]]