brdg_hierarchical {gtsummary} | R Documentation |
Hierarchy table bridge
Description
Bridge function for converting tbl_hierarchical()
(and similar) cards to basic gtsummary objects.
All bridge functions begin with prefix brdg_*()
.
This file also contains helper functions for constructing the bridge,
referred to as the piers (supports for a bridge) and begin with pier_*()
.
-
brdg_hierarchical()
: The bridge function ingests an ARD data frame and returns a gtsummary table that includes.$table_body
and a basic.$table_styling
. The.$table_styling$header
data frame includes the header statistics. Based on context, this function adds a column to the ARD data frame named"gts_column"
. This column is used during the reshaping in thepier_*()
functions defining column names. -
pier_*()
: these functions accept a cards tibble and returns a tibble that is a piece of the.$table_body
. Typically these will be stacked to construct the final table body data frame. The ARD object passed here will have two primary parts: the calculated summary statistics and the attributes ARD. The attributes ARD is used for labeling. The ARD data frame passed to this function must include a"gts_column"
column, which is added inbrdg_hierarchical()
.
Usage
brdg_hierarchical(
cards,
variables,
by,
include,
statistic,
overall_row,
count,
is_ordered,
label
)
pier_summary_hierarchical(cards, variables, include, statistic)
Arguments
cards |
( |
variables |
( |
by |
( |
include |
( |
statistic |
(named |
overall_row |
(scalar |
count |
(scalar |
is_ordered |
(scalar |
label |
(named |
Value
a gtsummary object
See Also
Review list, formula, and selector syntax used throughout gtsummary