clin_group_by: Configure a clintable to table by a grouping variable, which...

View source: R/pagination.R

clin_group_byR Documentation

Configure a clintable to table by a grouping variable, which will be used as a label

Description

Configure a clintable to table by a grouping variable, which will be used as a label

Usage

clin_group_by(x, group_by, caption_by = NULL, when = c("change", "notempty"))

Arguments

x

A clintable object

group_by

A character vector of variable names which will be used for grouping and attached as a label above the table headers

caption_by

A single element string of a variable name which will be used as a caption attached below the table body and above in the footer. Defaults to NULL.

when

Character string indicating how to identify groups and captions:

  • "change": Add padding when the value in group_by or caption_by changes from the previous row.

  • "notempty": Add padding when the value in group_by or caption_by is not empty.

Value

A clintable object

Examples

clintable(iris) |>
  clin_group_by("Species")

clinify documentation built on Aug. 8, 2025, 7:45 p.m.