title: Create a new column based on several conditions
body: <p>I want to create a new column based on some conditions imposed on several columns. For example, here is an example dataset:</p>
  <pre><code>a &lt;- data.frame(x=c(1,0,1,0,0), y=c(0,0,0,0,0), z=c(1,1,0,0,0))
  a
    x y z
  1 1 0 1
  2 0 0 1
  3 1 0 0
  4 0 0 0
  5 0 0 0
  </code></pre>
  <p>Specifically, if for any particular row 1 is present, then the new column returns 1. If all are 0, then the new column returns 0. So the dataset with the new column will be</p>
  <pre><code>  x y z w
  1 1 0 1 1
  2 0 0 1 1
  3 1 0 0 1
  4 0 0 0 0
  5 0 0 0 0
  </code></pre>
  <p>My initial thought was to use <code>%in%</code> but couldn't get the result I want. Thank you for your help!</p>