auto_summarise: Summarise with automatic codebook registration

View source: R/02_verbs.R

auto_summariseR Documentation

Summarise with automatic codebook registration

Description

Works exactly like dplyr::summarise(), but also captures each expression and registers the resulting variable in the codebook.

Usage

auto_summarise(.data, labels = list(), block = "", ..., .groups = "drop")

Arguments

.data

A Spark DataFrame (tbl_spark) or local data frame.

labels

Named list mapping variable names to labels (descriptions). Variables not in this list get their own name as label.

block

Optional character label for the pipeline block/section (e.g. "Demographic variables"). Groups variables in the codebook.

...

Named expressions, same syntax as dplyr::mutate().

.groups

Grouping behavior after summarise. Default: "drop".

Value

The summarised data frame.


autocodebook documentation built on June 9, 2026, 1:09 a.m.