title: How to extract a vector in a tibble column to multiple columns in the same tibble?
body: <p>The following code produces a vector of length 6 in the last column, from that column I would like to extract 6 new columns in my tibble.</p>
  
  <pre><code>require(tidyverse)
  require(purrrlyr)
  # this function will return a vector of the same length (6) for each group
  fun=function(X,Y){
     mycut&lt;-cut(X,breaks=seq(50,350,by=50),right=FALSE)
     v&lt;-tapply(Y,mycut,sum)
     return(v)
  }
  # use the previous function to count gears per class of hp
  mtcars %&gt;%
      group_by(cyl)  %&gt;%   
      by_slice(~fun(.x$hp,.x$gear)) %&gt;%
      rename(cut=.out)
  </code></pre>
  
  <p>Here I have a vector in my column cut</p>
  
  <pre><code># tibble [3 x 2]
       cyl       cut
    &lt;fctr&gt;    &lt;list&gt;
  1      4 &lt;dbl [6]&gt;
  2      6 &lt;dbl [6]&gt;
  3      8 &lt;dbl [6]&gt;
  </code></pre>
  
  <p>What command do I need to pass from this vector to a table like?</p>
  
  <pre><code>cyl  [50,100) [100,150) [150,200) [200,250) [250,300) [300,350) 
     4     36         9        NA        NA        NA        NA 
     ...
  </code></pre>
  
  <p><code>unnest</code> does not work. Do I have to work with <code>by_row</code> or is there a more straightforward answer?</p>