dt_group_by {dataMojo}R Documentation

group by columns and return a summarized table

Description

group by columns and return a summarized table

Usage

dt_group_by(dt, group_by_cols, summarize_at, operation)

Arguments

dt

input data.table

group_by_cols

group by columns

summarize_at

column summarize at

operation

calculation operation, value should be one of following: sum, mean, median, max, min

Value

a summarized table

Examples

data("dt_groups")
dataMojo::dt_group_by(dt_groups,
                      group_by_cols = c("group1", "group2"),
                      summarize_at = "A1",
                      operation = "mean")

[Package dataMojo version 1.0.0 Index]