title: Check row wise if value is present in column and update new column row wise
body: <p>In R, how can I check per row if any value in a list (eg. 2, 3 or 4) is present in any one of three columns and then change that row in a fourth column?</p>
  
  <p>Say I have a df:</p>
  
  <pre><code> A B C D
   1 1 1
   2 1 1
   3 1 1
  </code></pre>
  
  <p>I would like to write (without a for-loop) 
  if row n (column A or B or C) == 2 or 3 or 4  then D[1,]=1, else = 0</p>
  
  <p>Basically check row wise if my numbers are present in any of three specific columns and, if so, update a forth column with 1, if not a 0.</p>
  
  <p>Thanks,</p>