title: Use column names from vector in for loop in dplyr
body: <p>this should probably be quite straightforward, but I am struggling to get it to work. I currently have a vector of column names:</p>
  
  <pre><code>columns &lt;- c('product1', 'product2', 'product3', 'support4')
  </code></pre>
  
  <p>I now want to use dplyr in a for loop to mutate some columns, but I am struggling to make it recognize that it is a column name, not a variable.</p>
  
  <pre><code>for (col in columns) {
    cross.sell.val &lt;- cross.sell.val %&gt;%
      dplyr::mutate(col = ifelse(col == 6, 6, col)) %&gt;%
      dplyr::mutate(col = ifelse(col == 5, 6, col))
  }
  </code></pre>
  
  <p>Can I use %>% in these situations? Thanks..</p>