title: How to mutate a new column with yes or no value if at least one column from col7 to col10 is equal to 4 in r using dplyr?
body: <p>I have a data as follows: </p>
  
  <pre><code> col1 &lt;- c(0.1,0.2,0.0,0.5,0.6)
   col2 &lt;- c(2,2,4,5,6)
   col3 &lt;- c(1,4,3,4,5) 
   col4 &lt;- c(2,3,4,4,6)
   col5 &lt;- c(5,3,3,2,1)
   data.frame(col1,col2,col3,col4,col5)
  
     col1 col2 col3 col4 col5
   1  0.1    2    1    2    5
   2  0.2    2    4    3    3
   3  0.0    4    3    4    3
   4  0.5    5    4    4    2
   5  0.6    6    5    6    1
  </code></pre>
  
  <p>I would like to add a new column with "yes" value where in each row at least one column from col2 to column 5 is equal to 4 and "no" when the data does not meet the criteria. </p>
  
  <p>So the output would look like as: </p>
  
  <pre><code>   col1 col2 col3 col4 col5 col6
   1  0.1    2    1    2    5  no
   2  0.2    2    4    3    3  yes
   3  0.0    4    3    4    3  yes
   4  0.5    5    4    4    2  yes
   5  0.6    6    5    6    1  no
  </code></pre>
  
  <p>here is my command: </p>
  
  <pre><code>new.df &lt;- df %&gt;% mutate(df, col6 = funs(ifelse(abs(vars(c(2:5) == 4),"yes", "no")
  </code></pre>
  
  <p>But I can not get the required output. do you have any idea how can I use dplyr, mutate and if else function to get the result? </p>