kohske/ggplot2 — comment on commit 1815bf1b79ba8c4559587f8d7aca84ae6335af2f
File:  line 0
By kohske:

Just a note for the internal structure of stats calculation.
To be exact, the call stack is:

1. Stat_*::calculate_groups
2. Layer::calc_statistics
3. calculate_stats in panel.r
4. ggplot_buide

what the Stat::calculate_groups does is:

1. split data into groups
2. apply stat calculation to each grop
3. collect the results of all groups
4. bind the stat results and other parameters

So, if the Stat::calculate_groups is overwritten by the sub-class,
it need to bind stats and other params (4) if necessary.

@wch found the suspicious commit: a6b74b28d72ea5620869ce3fa26f437345239d65
After this commit, the params other than x, y is dropped in stat_sum::calcualte_groups.