-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update in tbl_ard_summary()
to assign default summary types for non-standard ARDs
#2001
Conversation
ard <- | ||
structure(list(group1 = c("trt", "trt", "trt", "trt", "trt", | ||
"trt"), group1_level = list("Drug A", "Drug A", "Drug B", "Drug B", | ||
"Drug A", "Drug B"), variable = c("time", "time", "time", | ||
"time", "age", "age"), variable_level = list(12, 24, 12, 24, | ||
NULL, NULL), context = c("survival", "survival", "survival", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something is off with the styler here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't like this style?? 😝😝😝
# This ARD was created with this code: | ||
# cards::bind_ard( | ||
# survival::survfit(survival::Surv(ttdeath, death) ~ trt, trial) |> | ||
# cardx::ard_survival_survfit(times = c(12, 24)) |> | ||
# dplyr::filter(stat_name %in% c("estimate")) |> | ||
# dplyr::mutate( | ||
# fmt_fn = list("xx.x%"), | ||
# group1_level = unlist(group1_level) |> as.character() |> as.list() | ||
# ), | ||
# cardx::ard_stats_t_test_onesample(trial, variables = age, by = trt) |> | ||
# dplyr::filter(stat_name %in% c("estimate")) | ||
# ) |> | ||
# dplyr::select(-cards::all_missing_columns()) |> | ||
# dput() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not creating it? does it take a long time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OH boy, IDK what I was thinking! Updated to just build the ARDs. THANK YOU for questioning haha
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good for me! Thanks Daniel :)
Co-authored-by: Davide Garolini <[email protected]>
Thank you so much @Melkiades !! |
What changes are proposed in this pull request?
tbl_ard_summary()
to better handle non-standard ARDs (i.e. not our typical continuous or categorical summaries) by assigning them a default summary type. (in thetbl_ard_*()
workflows, don't assign newgts_column
if it is already present #1991)The most common way to determine how a variable will be summarized (e.g. continuous or categorial) is with the context column. This works well for the standard univariate summaries, but when we incorporate non-standard ARDs, no default type was assigned.
If there is an GitHub issue associated with this pull request, please provide link.
closes #1999
Reviewer Checklist (if item does not apply, mark is as complete)
pkgdown::build_site()
. Check the R console for errors, and review the rendered website.devtools::test_coverage()
usethis::use_spell_check()
runs with no spelling errors in documentationWhen the branch is ready to be merged into master:
NEWS.md
with the changes from this pull request under the heading "# gtsummary (development version)
". If there is an issue associated with the pull request, reference it in parentheses at the end update (seeNEWS.md
for examples).usethis::use_version(which = "dev")
usethis::use_spell_check()
again