title: how to use tidydots in case_when?
body: <p>The documentation for <code>dplyr::case_when</code> states that "These dots support tidy dots features. In particular, if your patterns are stored in a list, you can splice that in with !!!."  But I can't seem to figure out how to do it.  And existing questions about this issue on stackoverflow seem out of date -- maybe they were before rlang 0.3.0.</p>
  
  <p>Here's what I've tried:</p>
  
  
  
  <pre class="lang-r prettyprint-override"><code>my_cases &lt;- list(
    Species == "setosa" ~ "S",
    TRUE ~ "other"
  )
  
  tiris &lt;- tibble::as_tibble(iris)
  tiris
  #&gt; # A tibble: 150 x 5
  #&gt;    Sepal.Length Sepal.Width Petal.Length Petal.Width Species
  #&gt;           &lt;dbl&gt;       &lt;dbl&gt;        &lt;dbl&gt;       &lt;dbl&gt; &lt;fct&gt;  
  #&gt;  1          5.1         3.5          1.4         0.2 setosa 
  #&gt;  2          4.9         3            1.4         0.2 setosa 
  #&gt;  3          4.7         3.2          1.3         0.2 setosa 
  #&gt;  4          4.6         3.1          1.5         0.2 setosa 
  #&gt;  5          5           3.6          1.4         0.2 setosa 
  #&gt;  6          5.4         3.9          1.7         0.4 setosa 
  #&gt;  7          4.6         3.4          1.4         0.3 setosa 
  #&gt;  8          5           3.4          1.5         0.2 setosa 
  #&gt;  9          4.4         2.9          1.4         0.2 setosa 
  #&gt; 10          4.9         3.1          1.5         0.1 setosa 
  #&gt; # … with 140 more rows
  
  dplyr::mutate(tiris,
    new_label = dplyr::case_when(!!!my_cases)
  )
  #&gt; Error in eval_tidy(pair$lhs, env = default_env): object 'Species' not found
  
  
  
  
  
  devtools::session_info()
  #&gt; ─ Session info ──────────────────────────────────────────────────────────
  #&gt;  setting  value                       
  #&gt;  version  R version 3.5.3 (2019-03-11)
  #&gt;  os       macOS Mojave 10.14.3        
  #&gt;  system   x86_64, darwin15.6.0        
  #&gt;  ui       X11                         
  #&gt;  language (EN)                        
  #&gt;  collate  en_US.UTF-8                 
  #&gt;  ctype    en_US.UTF-8                 
  #&gt;  tz       America/New_York            
  #&gt;  date     2019-03-31                  
  #&gt; 
  #&gt; ─ Packages ──────────────────────────────────────────────────────────────
  #&gt;  package     * version date       lib source        
  #&gt;  assertthat    0.2.1   2019-03-21 [1] CRAN (R 3.5.3)
  #&gt;  backports     1.1.3   2018-12-14 [1] CRAN (R 3.5.0)
  #&gt;  callr         3.2.0   2019-03-15 [1] CRAN (R 3.5.1)
  #&gt;  cli           1.1.0   2019-03-19 [1] CRAN (R 3.5.1)
  #&gt;  crayon        1.3.4   2017-09-16 [1] CRAN (R 3.5.0)
  #&gt;  desc          1.2.0   2018-05-01 [1] CRAN (R 3.5.0)
  #&gt;  devtools      2.0.1   2018-10-26 [1] CRAN (R 3.5.3)
  #&gt;  digest        0.6.18  2018-10-10 [1] CRAN (R 3.5.0)
  #&gt;  dplyr         0.8.0.1 2019-02-15 [1] CRAN (R 3.5.2)
  #&gt;  evaluate      0.13    2019-02-12 [1] CRAN (R 3.5.2)
  #&gt;  fansi         0.4.0   2018-10-05 [1] CRAN (R 3.5.0)
  #&gt;  fs            1.2.7   2019-03-19 [1] CRAN (R 3.5.3)
  #&gt;  glue          1.3.1   2019-03-12 [1] CRAN (R 3.5.1)
  #&gt;  highr         0.8     2019-03-20 [1] CRAN (R 3.5.3)
  #&gt;  htmltools     0.3.6   2017-04-28 [1] CRAN (R 3.5.0)
  #&gt;  knitr         1.22    2019-03-08 [1] CRAN (R 3.5.2)
  #&gt;  magrittr      1.5     2014-11-22 [1] CRAN (R 3.5.0)
  #&gt;  memoise       1.1.0   2017-04-21 [1] CRAN (R 3.5.0)
  #&gt;  pillar        1.3.1   2018-12-15 [1] CRAN (R 3.5.0)
  #&gt;  pkgbuild      1.0.3   2019-03-20 [1] CRAN (R 3.5.3)
  #&gt;  pkgconfig     2.0.2   2018-08-16 [1] CRAN (R 3.5.0)
  #&gt;  pkgload       1.0.2   2018-10-29 [1] CRAN (R 3.5.0)
  #&gt;  prettyunits   1.0.2   2015-07-13 [1] CRAN (R 3.5.0)
  #&gt;  processx      3.3.0   2019-03-10 [1] CRAN (R 3.5.2)
  #&gt;  ps            1.3.0   2018-12-21 [1] CRAN (R 3.5.0)
  #&gt;  purrr         0.3.2   2019-03-15 [1] CRAN (R 3.5.1)
  #&gt;  R6            2.4.0   2019-02-14 [1] CRAN (R 3.5.2)
  #&gt;  Rcpp          1.0.1   2019-03-17 [1] CRAN (R 3.5.1)
  #&gt;  remotes       2.0.2   2018-10-30 [1] CRAN (R 3.5.0)
  #&gt;  rlang         0.3.3   2019-03-29 [1] CRAN (R 3.5.3)
  #&gt;  rmarkdown     1.12    2019-03-14 [1] CRAN (R 3.5.1)
  #&gt;  rprojroot     1.3-2   2018-01-03 [1] CRAN (R 3.5.0)
  #&gt;  sessioninfo   1.1.1   2018-11-05 [1] CRAN (R 3.5.0)
  #&gt;  stringi       1.4.3   2019-03-12 [1] CRAN (R 3.5.1)
  #&gt;  stringr       1.4.0   2019-02-10 [1] CRAN (R 3.5.2)
  #&gt;  testthat      2.0.1   2018-10-13 [1] CRAN (R 3.5.0)
  #&gt;  tibble        2.1.1   2019-03-16 [1] CRAN (R 3.5.1)
  #&gt;  tidyselect    0.2.5   2018-10-11 [1] CRAN (R 3.5.0)
  #&gt;  usethis       1.4.0   2018-08-14 [1] CRAN (R 3.5.0)
  #&gt;  utf8          1.1.4   2018-05-24 [1] CRAN (R 3.5.0)
  #&gt;  withr         2.1.2   2018-03-15 [1] CRAN (R 3.5.0)
  #&gt;  xfun          0.5     2019-02-20 [1] CRAN (R 3.5.2)
  #&gt;  yaml          2.2.0   2018-07-25 [1] CRAN (R 3.5.0)
  #&gt; 
  #&gt; [1] /Library/Frameworks/R.framework/Versions/3.5/Resources/library
  </code></pre>