title: How to select columns based on string using dplyr
body: <p>I can select and rename the column name like this without any problem:</p>
  
  <p>
  <br/></p>
  
  <pre class="lang-r prettyprint-override"><code>library(tidyverse)
  iris &lt;- as.tibble(iris)
  iris %&gt;% select(sepal_ln = Sepal.Length, sepal_wd = Sepal.Width)
  #&gt; # A tibble: 150 × 2
  #&gt;    sepal_ln sepal_wd
  #&gt;       &lt;dbl&gt;    &lt;dbl&gt;
  #&gt; 1       5.1      3.5
  #&gt; 2       4.9      3.0
  #&gt; 3       4.7      3.2
  #&gt; 4       4.6      3.1
  #&gt; 5       5.0      3.6
  #&gt; 6       5.4      3.9
  #&gt; 7       4.6      3.4
  #&gt; 8       5.0      3.4
  #&gt; 9       4.4      2.9
  #&gt; 10      4.9      3.1
  #&gt; # ... with 140 more rows
  </code></pre>
  
  <p>But want I want do to do is to call the column from string instead of column name. I tried the following but it failed:</p>
  
  <pre class="lang-r prettyprint-override"><code>&gt; wanted &lt;- "Sepal"
  &gt; iris %&gt;% select(sepal_ln = !! paste0(wanted,".Length"), 
  +                 sepal_wd = !! paste0(wanted,".Width"), 
  + )
  Error: "Sepal.Length", "Sepal.Width": must resolve to integer column positions, not string
  &gt; 
  </code></pre>
  
  <p>What's the right way to do that?</p>