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_difference()

Add difference between groups

add_n(<tbl_summary>) add_n(<tbl_svysummary>)

Add column with N

add_ci()

Add Proportion CIs

add_stat_label()

Add statistic labels

add_stat()

Add a custom statistic column

separate_p_footnotes()

Create footnotes for individual p-values

Cross Tables

tbl_cross()

Create a cross table of summary statistics

add_p(<tbl_cross>)

Adds p-value to crosstab table

Continuous Variable Summary

tbl_continuous()

Summarize a continuous variable

Time-to-event Summary Tables

tbl_survfit()

Creates table of survival probabilities

add_p(<tbl_survfit>)

Adds p-value to survfit table

add_n(<tbl_survfit>)

Add column with number of observations

add_nevent(<tbl_survfit>)

Add column with number of observed events

add_q()

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

Survey Design Summary Tables

tbl_svysummary()

Create a table of summary statistics from a survey object

add_p(<tbl_svysummary>)

Adds p-values to svysummary tables

add_q()

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

add_overall()

Add column with overall summary statistics

add_difference()

Add difference between groups

add_n(<tbl_summary>) add_n(<tbl_svysummary>)

Add column with N

add_stat_label()

Add statistic labels

add_stat()

Add a custom statistic column

separate_p_footnotes()

Create footnotes for individual p-values

Regression Model Summary Tables

tbl_regression()

Display regression model results in table

tbl_uvregression()

Display univariate regression model results in table

add_global_p()

Add the global p-values

add_n(<tbl_regression>) add_n(<tbl_uvregression>)

Add N to regression table

add_nevent(<tbl_regression>) add_nevent(<tbl_uvregression>)

Add event N to regression table

combine_terms()

Combine terms in a regression model

add_glance_table() add_glance_source_note()

Add Model Statistics

add_q()

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

add_significance_stars()

Add significance stars

add_vif()

Add Variance Inflation Factor

plot(<tbl_regression>) plot(<tbl_uvregression>)

Plot Regression Coefficients

Inline Reporting

inline_text(<tbl_summary>) inline_text(<tbl_svysummary>)

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

inline_text(<gtsummary>)

Report statistics from summary tables inline

Output Types

as_gt()

Convert gtsummary object to a gt object

as_flex_table()

Convert gtsummary object to a flextable object

as_kable()

Convert gtsummary object to a kable object

as_kable_extra()

Convert gtsummary object to a kableExtra object

as_hux_table()

Convert gtsummary object to a huxtable object

as_tibble(<gtsummary>)

Convert gtsummary object to a tibble

Other Functions

Merge, Stack, Stratify, or Split Summary Tables

tbl_merge()

Merge two or more gtsummary objects

tbl_stack()

Stacks two or more gtsummary objects

tbl_strata()

Stratified gtsummary tables

tbl_split() print(<tbl_split>)

Split gtsummary table

tbl_butcher()

Reduce size of gtsummary objects

Style Summary Tables

modify_header() modify_footnote() modify_spanning_header() modify_caption() show_header_names()

Modify column headers, footnotes, spanning headers, and table captions

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() filter_p()

Sort and filter variables in table by p-values

remove_row_type()

Remove rows by type

Style/Format Numeric Vectors

style_percent()

Style percentages

style_pvalue()

Style p-values

style_sigfig()

Style significant figure-like rounding

style_ratio()

Style significant figure-like rounding for ratios

style_number()

Style numbers

Themes

set_gtsummary_theme() reset_gtsummary_theme()

Set a gtsummary theme

theme_gtsummary_journal() theme_gtsummary_compact() theme_gtsummary_printer() theme_gtsummary_language() theme_gtsummary_continuous2() theme_gtsummary_mean_sd() theme_gtsummary_eda()

Available gtsummary themes

Advanced modifiers

modify_table_styling()

Modify Table Styling

modify_table_body()

Modify Table Body

modify_column_hide() modify_column_unhide()

Modify Hidden Columns

modify_fmt_fun()

Modify Formatting Functions

modify_cols_merge()

Modify Column Merging

Select Helpers

all_continuous() all_continuous2() all_categorical() all_dichotomous() all_tests() all_stat_cols() all_interaction() all_intercepts() all_contrasts()

Select helper functions

Custom Tidiers

tidy_standardize() tidy_bootstrap() tidy_robust() pool_and_tidy_mice() tidy_gam()

Collection of custom tidiers

Data

trial

Results from a simulated study of two chemotherapy agents