title: Detect at least one match between each data frame row and values in vector
body: <p>My dataframe looks like this:</p>
  <pre><code>x1 &lt;- c(&quot;a&quot;, &quot;c&quot;, &quot;f&quot;, &quot;j&quot;)
  x2 &lt;- c(&quot;b&quot;, &quot;c&quot;, &quot;g&quot;, &quot;k&quot;)
  x3 &lt;- c(&quot;b&quot;, &quot;d&quot;, &quot;h&quot;, NA)
  x4 &lt;- c(&quot;a&quot;, &quot;e&quot;, &quot;i&quot;, NA)
  df &lt;- data.frame(x1, x2, x3, x4, stringsAsFactors=F)
  
  df
  
  x1 x2   x3   x4
  1  a  b    b    a
  2  c  c    d    e
  3  f  g    h    i
  4  j  k &lt;NA&gt; &lt;NA&gt;
  </code></pre>
  <p>Now I have an arbitrary vector:</p>
  <pre><code>vec &lt;- c(&quot;a&quot;, &quot;i&quot;, &quot;s&quot;, &quot;t&quot;, &quot;z&quot;)
  </code></pre>
  <p>I would like to compare the vector values with each row in the data frame and create an additional column that indicates whether <em>at least one</em> (ANY) of the vector values was found or not.</p>
  <p>The resulting dataframe should look like this:</p>
  <pre><code>  x1 x2   x3   x4 valueFound
  1  a  b    b    a          1
  2  c  c    d    e          0
  3  f  g    h    i          1
  4  j  k &lt;NA&gt; &lt;NA&gt;          0
  </code></pre>
  <p>I would like to do it without looping. Thank you very much for your support!</p>
  <p>Rami</p>