Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes are proposed in this pull request?
modify_header()
have been updated so users may more easily access internal data while defining headers. For example, whenever a user updates the header oftbl_summary(by=)
column, they will have access to the level, and the Ns within that level. Previously, they needed to use astat_by=
argument that did not fit well with the structure of a general gtsummary object. There is no longer a need to call this function: the users will simply have access to these values via teh glue syntax when defining the header. Moreover, these counts are now available fortbl_svysummary()
objects including the unweighted counts.modify_header_internal()
function has been removed and simply replaced withmodify_header()
.modify_header()
function no longer adds its call to the gtsummary.$call_list
. The call list is used to more easily re-construct the series of gtsummary calls if needed. However, the column headers can easily be re-constructed from the.$table_header
object.closes #668
Checklist for PR reviewer
tbl_summary()
, was the same change implemented fortbl_svysummary()
?_pkgdown.yml
pkgdown::build_site()
. Check the R console for errors, and review the rendered website.covr::report()
. Before you run, setSys.setenv(NOT_CRAN="true")
and begin in a fresh R session without any packages loaded.usethis::use_spell_check()
runs with no spelling errors in documentationWhen the branch is ready to be merged into master:
# gtsummary (development version)
". If there is an issue associated with the pull request, reference it in parantheses at the end update (seeNEWS.md
for examples).usethis::use_version(which = "dev")
codemetar::write_codemeta()
usethis::use_spell_check()
again