title: mutate specific columns with tidyverse
body: <p>quick question: Can somebody tell me how I do the following in the dplyr syntax?</p>
  <pre><code>p4[,1:5] &lt;- lapply(p4[,1:5] , factor)
  </code></pre>
  <p>Col 1 - 5 were characters and I wanted them to be factors. However, with dplyr I didnt get the job done. My guess was:</p>
  <pre><code>df &lt;- df %&gt;% select(1:5) %&gt;% mutate(as_factor)
  </code></pre>
  <p>But that drops all other columns because of the select function. Also, mutate_if is not really helpful here because I have other cols that are characters which I dont want to be changed.</p>
  <p>Thank you very much.</p>