title: #R how to mutate case_when based on column name taken from vector
body: <p>I'm working to create factor variables from numeric column, but i want to use listed value as parameter for desired column. I have been able to select a column based on vector input but still unable to do it inside mutate case_when</p>
  <pre><code>var1 = &quot;transfer&quot;
  var2 = &quot;transfer_tier&quot;
  
  tier &lt;- trx %&gt;%
    select_(.dots = var1) %&gt;% 
    mutate_(var2 = case_when(
      var1 &lt;= 1e3 ~ '1. &lt;1k',
      var1 &lt;= 1e4 ~ '1. &lt;10k',))
  </code></pre>
  <p>using above code shows no error but the formula that i want does not work. var2 is created with all NA. how to call var1 properly?</p>