Creates subsets of a dataset and then applies aggregate functions over it, while retaining knowledge of which filtering conditions were applied.
1 |
datatable |
a data.table object |
cols |
columns to group by and retain after aggregation |
retain_all |
hold back an 'All' option for each col supplied in cols |
fn |
a function taking a datatable that returns |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.