title: R: trouble converting a list to dataframe using as.data.frame()
body: <p>I seem to have problems converting a list to a dataframe in R. i used the following code to calculate a cumsum: </p>
  
  <pre><code>kaka_final &lt;- kaka_final %&gt;% group_by(id) %&gt;% 
          mutate(cumCost = order_by(month, cumsum(cost)))
  </code></pre>
  
  <p>Worked perfect but returns a list and not a dataframe as i need in the next method. So i used the as.data.frame function but that doesn't seem to work either it still returns a list:</p>
  
  <pre><code>kaka_final &lt;- as.data.frame(kaka_final %&gt;% group_by(id) %&gt;% 
      mutate(cumCost = order_by(month, cumsum(cost)))) 
  &gt; 
  &gt; B &lt;- as.data.frame(kaka_final)
  &gt; 
  &gt; typeof(kaka_final)
  [1] "list"
  &gt; typeof(B)
  [1] "list"
  </code></pre>
  
  <p>what am i doing wrong here?  </p>