[R] Find identical pairs

Downey, Patrick PDowney at urban.org
Thu Mar 8 17:24:39 CET 2012


Hi Alex,

x <- sample.int(4,20,replace=TRUE)
y <- sample.int(4,20,replace=TRUE)
cbind(x,y)[x==y,]

Thanks,
Mitch


-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of Alaios
Sent: Thursday, March 08, 2012 11:18 AM
To: R help
Subject: [R] Find identical pairs

Dear all I am having two numerical vector the x and y.

I would like to find the identical x,y pairs. How I can do that in R?

I would like to thank you in advance 



B.R
Alex

	[[alternative HTML version deleted]]

______________________________________________
R-help at 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.



More information about the R-help mailing list