R: Comparing two binary vectors -
im new r. have 2 vectors of zeros , ones. want find rows both zeros, both ones. zeros 1 or 1 zeros. cannot seem find 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)
you looking table
...
table( , b ) b 0 1 0 2 3 1 3 2
Comments
Post a Comment