title: grouped data frame to list
body: <p>I've got a data frame that contains names that are grouped, like so:</p>
  
  <pre><code>df &lt;- data.frame(group = rep(letters[1:2], each=2),
                   name = LETTERS[1:4])
  &gt; df
    group name
  1     a    A
  2     a    B
  3     b    C
  4     b    D
  </code></pre>
  
  <p>I would like to convert this into a list that is keyed on the group names and contains the names. Example output:</p>
  
  <pre><code>df_out &lt;- list(a=c('A', 'B'),
                 b=c('C', 'D'))
  
  &gt; df_out
  $a
  [1] "A" "B"
  
  $b
  [1] "C" "D"
  </code></pre>
  
  <p>This is <a href="https://stackoverflow.com/questions/34375162/r-convert-data-frame-to-list-of-lists">not a new question</a> but I would like to do this wholly within the tidyverse.</p>