group_by_bin: Group By Bin

View source: R/func_group_by_bin.R

group_by_binR Documentation

Group By Bin

Description

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

Usage

group_by_bin(d, col, group_col, .f = mean, ...)

Arguments

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

Author(s)

W. S. Drysdale and F. A. Squires


willdrysdale/wsdmiscr documentation built on Aug. 26, 2023, 12:31 a.m.