-
Notifications
You must be signed in to change notification settings - Fork 129
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
tbl_uvregression()
to accept survey objects
#740
Conversation
@larmarange would you mind reviewing this pull request please? Anytime we're working with survey objects, I feel somewhat nervous! Thank you! |
R/tbl_uvregression.R
Outdated
@@ -25,6 +25,7 @@ | |||
#' | |||
#' @param data Data frame to be used in univariate regression modeling. Data | |||
#' frame includes the outcome variable(s) and the independent variables. | |||
#' Survey design is also accepted. | |||
#' @param method Regression method (e.g. [lm], [glm], [survival::coxph], and more). |
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.
add [survey::svyglm] in the list of possibilities ?
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.
For me it looks OK. However, as is, it appears to be a hidden feature. I would simply update documentation. (cf comments)
Otherwise, this is great!!! :-)
@@ -106,6 +107,12 @@ tbl_uvregression <- function(data, method, y = NULL, x = NULL, method.args = NUL | |||
) |
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.
Add a third example in the examples using a survey object
@larmarange thank you so so so much! |
What changes are proposed in this pull request?
tbl_uvregression()
now accepts both data frames and survey objects as input.closes Add support for survey objects with
tbl_uvregression()
#742Checklist 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