cube: Computes grouped aggregates

Description Usage Arguments Examples

View source: R/cube.R

Description

Calculates aggregates functions for groups of variables and all their combinations

Usage

1
cube(df, groups = NULL, ..., .totals = "Total")

Arguments

df

A dataframe

groups

variables names

...

calculations passed to 'dplyr::summarize(...)'

.totals

A string of how output totals are labeled in the rows and cols

Examples

1
cube(mtcars, c(cyl, am), Avg = mean(mpg))

ismailmuller/pivotr documentation built on May 4, 2020, 4:28 a.m.