applyby: Apply a function to each group

View source: R/primitives.R

applybyR Documentation

Apply a function to each group

Description

Apply a function to each group

Usage

applyby(data, by, fun, ..., bind = FALSE, id = ".group")

Arguments

data

A data.frame.

by

Character vector of column names identifying groups or join keys.

fun

Function applied to each element, column, or group.

...

Additional arguments (unused, or passed through depending on the function).

bind

Combine the per-group results into a single table.

id

Optional name for a source identifier column.

Value

A list of per-group results, or a combined table when bind = TRUE.


basetable documentation built on Sept. 18, 2026, 9:13 a.m.