title: R pivot table with multiple column levels
body: <p>I would be grateful if anyone could tell me how to create pivot table in R like python pandas with selected aggregation function and more then one level in column.</p>
  
  <p>I would like to receive in R something like this in python:</p>
  
  <p><code>Iris.pivot_table(index='Sepal.Length',columns=['Sepal.Width','Species'],values='Petal.Length',aggfunc=sum)</code></p>
  
  <p>I know there is pivotabler package, but default rendering to html method is to slow for a bit larger tables.</p>
  
  <p>I also have found ftable function from stats package but its only for contingency tables, in which I can`t specify my own aggregation function.</p>
  
  <p>Thank you.</p>