agg_tbl: Aggregates a data.table

Description Usage Arguments Value Examples

Description

Aggregates a data.table

Usage

1
2
agg_tbl(dt, metric, metric_name = metric, dimension, agg_fn = "sum",
  na.rm = TRUE)

Arguments

dt

A data.table object

metric

A vector of numeric variable(s) to aggregate

metric_name

A vector of variable name(s) for the numeric variable(s) to aggregate. Defaults to metric.

dimension

A vector of dimension variable(s) to aggregate by

agg_fn

An aggregation function

na.rm

logical. Should missing values (including NaN) be removed?

Value

Returns a data.table

Examples

1
2
3
4
## Not run: 
to follow

## End(Not run)

Triamus/mandat documentation built on May 9, 2019, 5:13 p.m.