Package: gtsummary 2.0.2.9011

gtsummary: Presentation-Ready Data Summary and Analytic Result Tables

Creates presentation-ready tables summarizing data sets, regression models, and more. The code to create the tables is concise and highly customizable. Data frames can be summarized with any function, e.g. mean(), median(), even user-written functions. Regression models are summarized and include the reference rows for categorical variables. Common regression models, such as logistic regression and Cox proportional hazards regression, are automatically identified and the tables are pre-filled with appropriate column headers.

Authors:Daniel D. Sjoberg [aut, cre], Joseph Larmarange [aut], Michael Curry [aut], Jessica Lavery [aut], Karissa Whiting [aut], Emily C. Zabor [aut], Xing Bai [ctb], Esther Drill [ctb], Jessica Flynn [ctb], Margie Hannum [ctb], Stephanie Lobaugh [ctb], Shannon Pileggi [ctb], Amy Tin [ctb], Gustavo Zapata Wainberg [ctb]

gtsummary_2.0.2.9011.tar.gz
gtsummary_2.0.2.9011.zip(r-4.5)gtsummary_2.0.2.9011.zip(r-4.4)gtsummary_2.0.2.9011.zip(r-4.3)
gtsummary_2.0.2.9011.tgz(r-4.4-any)gtsummary_2.0.2.9011.tgz(r-4.3-any)
gtsummary_2.0.2.9011.tar.gz(r-4.5-noble)gtsummary_2.0.2.9011.tar.gz(r-4.4-noble)
gtsummary_2.0.2.9011.tgz(r-4.4-emscripten)gtsummary_2.0.2.9011.tgz(r-4.3-emscripten)
gtsummary.pdf |gtsummary.html
gtsummary/json (API)
NEWS

# Install 'gtsummary' in R:
install.packages('gtsummary', repos = c('https://ddsjoberg.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/ddsjoberg/gtsummary/issues

Datasets:
  • trial - Results from a simulated study of two chemotherapy agents

On CRAN:

easy-to-usegthtml5regression-modelsreproducibilityreproducible-researchstatisticssummary-statisticssummary-tablestable1tableone

16.61 score 1.1k stars 16 packages 7.6k scripts 49k downloads 8 mentions 148 exports 63 dependencies

Last updated 1 months agofrom:7e5a304093 (on v2.0.3). Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 03 2024
R-4.5-winOKNov 03 2024
R-4.5-linuxOKNov 03 2024
R-4.4-winOKNov 03 2024
R-4.4-macOKNov 03 2024
R-4.3-winOKNov 03 2024
R-4.3-macOKNov 03 2024

Exports:.create_gtsummary_object.escape_html.escape_latex.escape_latex2.table_styling_expr_to_row_number%>%add_ciadd_differenceadd_glance_source_noteadd_glance_tableadd_global_padd_nadd_neventadd_overalladd_padd_qadd_significance_starsadd_statadd_stat_labeladd_vifall_categoricalall_continuousall_continuous2all_contrastsall_dichotomousall_interactionall_interceptsall_ofall_stat_colsall_testsany_ofas_flex_tableas_gtas_hux_tableas_hux_xlsxas_kableas_kable_extraas_tibbleassign_summary_digitsassign_summary_typeassign_testsbold_labelsbold_levelsbold_pbrdg_continuousbrdg_hierarchicalbrdg_summarybrdg_wide_summarycheck_gtsummary_themecombine_termscontainscontinuous_summaryends_witheverythingfilter_pgather_ardget_gtsummary_themeglance_fun_s3global_pvalue_funinline_textinline_text.tbl_summaryitalicize_labelsitalicize_levelslabel_style_numberlabel_style_percentlabel_style_pvaluelabel_style_ratiolabel_style_sigfiglast_colmatchesmodify_captionmodify_cols_mergemodify_column_alignmentmodify_column_hidemodify_column_indentmodify_column_mergemodify_column_unhidemodify_fmt_funmodify_footnotemodify_headermodify_spanning_headermodify_table_bodymodify_table_stylingmutatenum_rangeone_ofpier_summary_categoricalpier_summary_continuouspier_summary_continuous2pier_summary_dichotomouspier_summary_hierarchicalpier_summary_missing_rowpkgdown_print.gtsummarypool_and_tidy_miceproportion_summaryratio_summaryremove_row_typereset_gtsummary_themescope_headerscope_table_bodyselectseparate_p_footnotesset_gtsummary_themeshow_header_namessort_pstarts_withstyle_numberstyle_percentstyle_pvaluestyle_ratiostyle_sigfigtbl_ard_continuoustbl_ard_hierarchicaltbl_ard_summarytbl_ard_wide_summarytbl_butchertbl_continuoustbl_crosstbl_custom_summarytbl_hierarchicaltbl_hierarchical_counttbl_likerttbl_mergetbl_regressiontbl_splittbl_stacktbl_stratatbl_strata2tbl_summarytbl_survfittbl_svysummarytbl_uvregressiontbl_wide_summarytheme_gtsummary_compacttheme_gtsummary_continuous2theme_gtsummary_edatheme_gtsummary_journaltheme_gtsummary_languagetheme_gtsummary_mean_sdtheme_gtsummary_printertidy_bootstraptidy_gamtidy_robusttidy_standardizetidy_wald_testvarswherewith_gtsummary_theme

Dependencies:base64encbigDbitopsbslibcachemcardsclicolorspacecommonmarkcpp11curldigestdplyrevaluatefansifarverfastmapfontawesomefsgenericsgluegthighrhtmltoolshtmlwidgetsjquerylibjsonlitejuicyjuiceknitrlabelinglifecyclemagrittrmarkdownmemoisemimemunsellpillarpkgconfigpurrrR6rappdirsRColorBrewerRcppreactablereactRrlangrmarkdownsassscalesstringistringrtibbletidyrtidyselecttinytexutf8V8vctrsviridisLitewithrxfunxml2yaml

Definition of a gtsummary Object

Rendered fromgtsummary_definition.Rmdusingknitr::rmarkdownon Nov 03 2024.

Last update: 2024-07-03
Started: 2020-02-06

Readme and manuals

Help Manual

Help pageTopics
Add CI Columnadd_ci add_ci.tbl_summary
Add CI Columnadd_ci.tbl_svysummary
Add differences between groupsadd_difference.tbl_summary
Add differences between groupsadd_difference.tbl_svysummary
Add model statisticsadd_glance add_glance_source_note add_glance_table
Add the global p-valuesadd_global_p add_global_p.tbl_regression add_global_p.tbl_uvregression
Add N to regression tableadd_n.tbl_regression add_n.tbl_uvregression add_n_regression
Add column with Nadd_n.tbl_likert add_n.tbl_summary add_n.tbl_svysummary add_n_summary
Add Nadd_n.tbl_survfit
Add event Nadd_nevent add_nevent.tbl_regression add_nevent.tbl_uvregression add_nevent_regression
Add event Nadd_nevent.tbl_survfit
Add overall columnadd_overall add_overall.tbl_continuous add_overall.tbl_custom_summary add_overall.tbl_summary add_overall.tbl_svysummary
ARD add overall columnadd_overall.tbl_ard_summary add_overall_ard
Add p-valuesadd_p.tbl_continuous
Add p-valueadd_p.tbl_cross
Add p-valuesadd_p.tbl_summary
Add p-valueadd_p.tbl_survfit
Add p-valuesadd_p.tbl_svysummary
Add multiple comparison adjustmentadd_q
Add significance starsadd_significance_stars
Add a custom statisticadd_stat
Add statistic labelsadd_stat_label add_stat_label.tbl_ard_summary add_stat_label.tbl_summary add_stat_label.tbl_svysummary
Add Variance Inflation Factoradd_vif
Convert gtsummary object to a flextable objectas_flex_table
Convert gtsummary object to gtas_gt
Convert gtsummary object to a huxtable objectas_hux_table as_hux_xlsx
Convert gtsummary object to a kable objectas_kable
Convert gtsummary object to a kableExtra objectas_kable_extra
Convert gtsummary object to a tibbleas.data.frame.gtsummary as_tibble.gtsummary
Assign Default Digitsassign_summary_digits
Assign Default Summary Typeassign_summary_type
Assign Testassign_tests assign_tests.tbl_continuous assign_tests.tbl_summary assign_tests.tbl_survfit assign_tests.tbl_svysummary
Bold or Italicizebold_italicize_labels_levels bold_labels bold_labels.gtsummary bold_labels.tbl_cross bold_levels bold_levels.gtsummary bold_levels.tbl_cross italicize_labels italicize_labels.gtsummary italicize_labels.tbl_cross italicize_levels italicize_levels.gtsummary italicize_levels.tbl_cross
Bold significant p-valuesbold_p
Continuous Summary Table Bridgesbrdg_continuous
Hierarchy table bridgebrdg_hierarchical pier_summary_hierarchical
Summary table bridgebrdg_summary pier_summary_categorical pier_summary_continuous pier_summary_continuous2 pier_summary_dichotomous pier_summary_missing_row
Wide summary table bridgebrdg_wide_summary
Combine termscombine_terms
Custom tidierscustom_tidiers pool_and_tidy_mice tidy_bootstrap tidy_gam tidy_robust tidy_standardize tidy_wald_test
Extract ARDsgather_ard
Report statistics from summary tables inlineinline_text.gtsummary
Report statistics from summary tables inlineinline_text.tbl_continuous
Report statistics from cross table inlineinline_text.tbl_cross
Report statistics from regression summary tables inlineinline_text.tbl_regression
Report statistics from summary tables inlineinline_text.tbl_summary inline_text.tbl_svysummary
Report statistics from survfit tables inlineinline_text.tbl_survfit
Report statistics from regression summary tables inlineinline_text.tbl_uvregression
Style Functionslabel_style label_style_number label_style_percent label_style_pvalue label_style_ratio label_style_sigfig
Modify column headers, footnotes, and spanning headersmodify modify_footnote modify_header modify_spanning_header show_header_names
Modify table captionmodify_caption
Modify column alignmentmodify_column_alignment
Modify hidden columnsmodify_column_hide modify_column_unhide
Modify column indentationmodify_column_indent
Modify Column Mergingmodify_column_merge
Modify formatting functionsmodify_fmt_fun
Modify Table Bodymodify_table_body
Modify Table Stylingmodify_table_styling
Plot Regression Coefficientsplot plot.tbl_regression plot.tbl_uvregression
Summarize a proportionproportion_summary
Summarize the ratio of two variablesratio_summary
Remove rowsremove_row_type
Select helper functionsall_categorical all_continuous all_continuous2 all_contrasts all_dichotomous all_interaction all_intercepts all_stat_cols all_tests select_helpers
Create footnotes for individual p-valuesseparate_p_footnotes
Set gtsummary themecheck_gtsummary_theme get_gtsummary_theme reset_gtsummary_theme set_gtsummary_theme with_gtsummary_theme
Sort/filter by p-valuesfilter_p sort_filter_p sort_p
Style numbersstyle_number
Style percentagesstyle_percent
Style p-valuesstyle_pvalue
Style ratiosstyle_ratio
Style significant figure-like roundingstyle_sigfig
Summarize continuous variabletbl_ard_continuous
ARD Hierarchical Tabletbl_ard_hierarchical
ARD summary tabletbl_ard_summary
Wide ARD summary tabletbl_ard_wide_summary
Butcher tabletbl_butcher
Summarize continuous variabletbl_continuous
Cross tabletbl_cross
Create a table of summary statistics using a custom summary functiontbl_custom_summary
Hierarchical Tabletbl_hierarchical tbl_hierarchical_count
Likert Summarytbl_likert
Merge tablestbl_merge
Regression model summarytbl_regression tbl_regression.default
Split gtsummary tableprint.tbl_split tbl_split tbl_split.gtsummary
Stack tablestbl_stack
Stratified gtsummary tablestbl_strata tbl_strata2
Summary tabletbl_summary
Survival tabletbl_survfit tbl_survfit.data.frame tbl_survfit.list tbl_survfit.survfit
Create a table of summary statistics from a survey objecttbl_svysummary
Univariable regression model summarytbl_uvregression tbl_uvregression.data.frame tbl_uvregression.survey.design
Wide summary tabletbl_wide_summary
Available gtsummary themestheme_gtsummary theme_gtsummary_compact theme_gtsummary_continuous2 theme_gtsummary_eda theme_gtsummary_journal theme_gtsummary_language theme_gtsummary_mean_sd theme_gtsummary_printer
Results from a simulated study of two chemotherapy agentstrial