Data Summary Tables

Standard Summary Tables

tbl_summary()

Create a table of summary statistics

add_p(<tbl_summary>)

Adds p-values to summary tables

add_q()

Add a column of q-values to account for multiple comparisons

add_overall()

Add column with overall summary statistics

add_n()

Add column with N

add_stat_label()

Add statistic labels

add_stat()

Add a custom statistic column

Cross Tables

tbl_cross()

Create a cross table of summary statistics

add_p(<tbl_cross>)

Adds p-value to crosstab table

Time-to-event Summary Tables

tbl_survfit()

Creates table of survival probabilities

Regression Model Summary Tables

tbl_regression()

Display regression model results in table

tbl_uvregression()

Display univariate regression model results in table

add_global_p(<tbl_regression>)

Adds the global p-value for categorical variables

add_global_p(<tbl_uvregression>)

Adds the global p-value for categorical variables

add_q()

Add a column of q-values to account for multiple comparisons

add_nevent(<tbl_regression>)

Add number of events to a regression table

add_nevent(<tbl_uvregression>)

Add number of events to a regression table

combine_terms()

Combine terms in a regression model

Inline Reporting

inline_text(<tbl_summary>)

Report statistics from summary tables inline

inline_text(<tbl_regression>)

Report statistics from regression summary tables inline

inline_text(<tbl_uvregression>)

Report statistics from regression summary tables inline

inline_text(<tbl_cross>)

Report statistics from cross table inline

inline_text(<tbl_survfit>)

Report statistics from survfit tables inline

Output Types

as_gt()

Convert gtsummary object to a gt object

as_kable()

Convert gtsummary object to a kable object

as_flextable()

Convert gtsummary object to a flextable object

as_kable_extra()

Convert gtsummary object to a kableExtra object

as_tibble(<gtsummary>)

Convert gtsummary object to a tibble

Other Functions

Stack or Merge Summary Tables

tbl_merge()

Merge two or more gtsummary objects

tbl_stack()

Stacks two or more gtsummary objects

Style Summary Tables

modify_header()

Modify column headers in gtsummary tables

modify_footnote()

Update gtsummary table footnote

modify_spanning_header()

Update gtsummary table spanning header

bold_labels() bold_levels() italicize_labels() italicize_levels()

Bold or Italicize labels or levels in gtsummary tables

bold_p()

Bold significant p-values or q-values

sort_p()

Sort variables in table by ascending p-values

Style/Format Numeric Vectors

style_percent()

Style percentages to be displayed in tables or text

style_pvalue()

Style p-values to be displayed in tables or text

style_sigfig()

Implement significant figure-like rounding

style_ratio()

Implement significant figure-like rounding for ratios

Themes

set_gtsummary_theme() reset_gtsummary_theme()

Set a gtsummary theme

theme_gtsummary_journal() theme_gtsummary_compact() theme_gtsummary_printer()

Available gtsummary themes

Select Helpers

all_continuous() all_categorical() all_dichotomous() all_numeric() all_character() all_integer() all_double() all_logical() all_factor()

Select helper functions

Data

trial

Results from a simulated study of two chemotherapy agents