dt_agg: Aggregate data in the style of data.table

Description Usage Arguments Value See Also Examples

View source: R/dtplyr.R

Description

Syntactic sugar for the common case of a dt_op with no filter.

Usage

1

Arguments

df

An R object that can be coerced to a data.table

...

Additional arguments for [.data.table, excluding the first

Value

data.table

See Also

dt_op

data.table

Examples

1
2
3
df <- data.frame(a = c(1, 1, 2, 2, 3, 3), b = 1:6)
dt_agg(df, sum(b), keyby = a)
df %>% dt_agg(sum(b), keyby = a)

mcskinner/dtplyr documentation built on Nov. 4, 2019, 6:23 p.m.