Thursday, 15 August 2013

R: Comparing two binary vectors

R: Comparing two binary vectors

Im new to R. I have two vectors of zeros and ones. I want to find which
rows are both zeros, both ones. zeros to one or one to zeros. I cannot
seem to find a question considering this. Thanks
ex.
a=c(0,0,0,1,0,1,1,1,0,1)
b=c(1,0,1,0,0,0,0,1,1,1)

No comments:

Post a Comment