agg_by_group: A convenient way to perform grouped operations

View source: R/agg_by_group.R

agg_by_groupR Documentation

A convenient way to perform grouped operations

Description

This function performs operations by grouping the data.

Usage

agg_by_group(data_set = NULL, my_formula = NULL, func = NULL, ...)

Arguments

data_set

The data set for which correlations are required

my_formula

A formula such as A~B where B is the grouping variable(normally a factor). See examples below

func

The kind of operation e.g sum,mean,min,max,manymodelr::get_mode

...

Other arguments to 'aggregate' see ?aggregate for details

Value

A grouped data.frame object with results of the chosen operation.

Examples

head(agg_by_group(airquality,.~Month,sum))

manymodelr documentation built on April 4, 2025, 12:01 a.m.