title: How to find matched rows by skipping certain column(s)?
body: <p>Suppose I have a vector <code>a</code>  such that</p>
  
  <pre><code>a&lt;-c(0, NA, 1, NA)
  </code></pre>
  
  <p>and a data frame like this:</p>
  
  <pre><code>set.seed(123)
  out1&lt;-data.frame(y1=rbinom(10, 1, 0.3),
                  y2=rbinom(10, 1, 0.4),
                  y3=rbinom(10, 1, 0.5),
                  y4=rbinom(10, 1, 0.6))
  out1
     y1 y2 y3 y4
  1   0  1  1  0
  2   1  0  1  0
  3   0  1  1  0
  4   1  0  1  0
  5   1  0  1  1
  6   0  1  1  1
  7   0  0  1  0
  8   1  0  1  1
  9   0  0  0  1
  10  0  1  0  1
  </code></pre>
  
  <p>How could I easily find out the matched rows for <code>a</code> by skipping column2 and column4, such a desired results like that:</p>
  
  <pre><code>   y1 y2 y3 y4
  1   0  1  1  0
  3   0  1  1  0
  6   0  1  1  1
  7   0  0  1  0
  </code></pre>