Skip to content

Commit

Permalink
tbl_custom_summary() (#976)
Browse files Browse the repository at this point in the history
* draft of tbl_custom_summary

fix #973

* document

* filter NA values

* pass stat_display as well

* using dplyr::group_modify instead of summarise

* document

* cleaning

* doc update

* experimental

* Option for adding an overall row

* documentation improvements

* better example

* documentation updates

* Create test-tbl_custom_summary.R

* doc updates

* Doc update

Caution section and not mentionning internal variable

* first helper to tbl_custom_summary

* Update test-tbl_custom_summary.R

* Update test-tbl_custom_summary.R

* fix for continuous_summary()

* .drop = FALSE when grouping

* avoiding .by and .variable

* theme elements for tbl_custom_summary()

* ratio_summary

* proportion_summary()

* improved examples

* doc update

* additional tests for tbl_custom_summary

* spell_check

* simpler syntax

* too long example

* misc updates

* doc updates

Co-authored-by: Daniel Sjoberg <danield.sjoberg@gmail.com>
  • Loading branch information
larmarange and ddsjoberg authored Oct 1, 2021
1 parent d16b145 commit c628c55
Show file tree
Hide file tree
Showing 31 changed files with 1,669 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: gtsummary
Title: Presentation-Ready Data Summary and Analytic Result
Tables
Version: 1.4.2.9013
Version: 1.4.2.9014
Authors@R:
c(person(given = "Daniel D.",
family = "Sjoberg",
Expand Down
5 changes: 5 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ S3method(add_n,tbl_uvregression)
S3method(add_nevent,tbl_regression)
S3method(add_nevent,tbl_survfit)
S3method(add_nevent,tbl_uvregression)
S3method(add_overall,tbl_custom_summary)
S3method(add_overall,tbl_summary)
S3method(add_overall,tbl_svysummary)
S3method(add_p,tbl_cross)
Expand Down Expand Up @@ -93,6 +94,7 @@ export(bold_levels)
export(bold_p)
export(combine_terms)
export(contains)
export(continuous_summary)
export(ends_with)
export(everything)
export(filter_p)
Expand All @@ -117,6 +119,8 @@ export(mutate)
export(num_range)
export(one_of)
export(pool_and_tidy_mice)
export(proportion_summary)
export(ratio_summary)
export(remove_row_type)
export(reset_gtsummary_theme)
export(select)
Expand All @@ -130,6 +134,7 @@ export(style_pvalue)
export(style_ratio)
export(style_sigfig)
export(tbl_cross)
export(tbl_custom_summary)
export(tbl_merge)
export(tbl_regression)
export(tbl_stack)
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

* Allow `add_p()` and `add_difference()` to be run on the same table. (#959)

* New function `tbl_custom_summary()` allowing to create a table of summary statistics using a custom summary function (#973, #976)

* Set of helpers to be used with `tbl_custom_summary()`: `continuous_summary()`, `proportion_summary()`, `ratio_summary()

* Added Standardized Mean Difference method to `add_difference()`, wrapping the {smd} package's calculations. (#966)

* Fix in `tbl_summary()` when a factor variable is passed that is all NA with no specified levels. (#977)
Expand Down
Binary file modified R/sysdata.rda
Binary file not shown.
Loading

0 comments on commit c628c55

Please sign in to comment.