title: inputting dots in dplyr without tilde or quotes
body: <p>How to get the following code to work <strong>without</strong> quotes or tilde? </p>
  
  <p>This is important to me because I am using this standalone code inside a custom function where introducing quotes or tilde complicates things.</p>
  
  <p>Thanks.</p>
  
  
  
  <pre class="lang-r prettyprint-override"><code>dataframe &lt;- as.data.frame(cbind(gender = c("male", "female", "female", "female", "male", "female", "male"),
                                   pet = c("dog", "cat", "dog", "cat", "cat", "cat", "dog")))
  
  library(dplyr)
  
  ## with tilde
  
  dplyr::group_by_(dataframe, .dots = c(~gender, ~pet)) %&gt;%
    dplyr::summarize(counts = n()) %&gt;%
    dplyr::mutate(perc = (counts / sum(counts)) * 100) %&gt;%
    dplyr::arrange(desc(perc))
  #&gt; # A tibble: 4 x 4
  #&gt; # Groups: gender [2]
  #&gt;   gender pet   counts  perc
  #&gt;   &lt;fct&gt;  &lt;fct&gt;  &lt;int&gt; &lt;dbl&gt;
  #&gt; 1 female cat        3  75.0
  #&gt; 2 male   dog        2  66.7
  #&gt; 3 male   cat        1  33.3
  #&gt; 4 female dog        1  25.0
  
  ## with quotes
  
  dplyr::group_by_(dataframe, .dots = c('gender', 'pet')) %&gt;%
    dplyr::summarize(counts = n()) %&gt;%
    dplyr::mutate(perc = (counts / sum(counts)) * 100) %&gt;%
    dplyr::arrange(desc(perc))
  #&gt; # A tibble: 4 x 4
  #&gt; # Groups: gender [2]
  #&gt;   gender pet   counts  perc
  #&gt;   &lt;fct&gt;  &lt;fct&gt;  &lt;int&gt; &lt;dbl&gt;
  #&gt; 1 female cat        3  75.0
  #&gt; 2 male   dog        2  66.7
  #&gt; 3 male   cat        1  33.3
  #&gt; 4 female dog        1  25.0
  
  ## without tilde
  
  dplyr::group_by_(dataframe, .dots = c(gender, pet)) %&gt;%
    dplyr::summarize(counts = n()) %&gt;%
    dplyr::mutate(perc = (counts / sum(counts)) * 100) %&gt;%
    dplyr::arrange(desc(perc))
  #&gt; Error in compat_lazy_dots(.dots, caller_env(), ...): object 'gender' not found
  </code></pre>