View source: R/func_group_by_bin.R
group_by_bin | R Documentation |
Takes a parameter and summarises by a bin column, then join this column onto the timeseries can be used to bin secondary parameters for things like geom_boxplot, where the fill aesthetic must be pre binned
group_by_bin(d, col, group_col, .f = mean, ...)
d |
dataframe containg col and group_col |
col |
name of column to group |
group_col |
name of column to group by i.e. the bins |
.f |
function to summarise by default mean |
... |
additional parameters for .f |
W. S. Drysdale and F. A. Squires
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.