-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Adding model construction helpers #121
Conversation
Code Coverage Summary
Diff against main
Results for commit: 531d054 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Unit Tests Summary 1 files 60 suites 8s ⏱️ Results for commit 531d054. ♻️ This comment has been updated with latest results. |
Unit Test Performance Difference
Additional test case details
Results for commit 37139ef ♻️ This comment has been updated with latest results. |
@shajoezhu @edelarua @ayogasekaram @Melkiades @zdz2101 I've added a function called Are there other characters that would require backticks to work properly? |
The only other things I saw as special characters are \n and \r (but the latter was likely a typo, considering what it does, ahah). I suspect it would work nonetheless |
Thanks @Melkiades ! I updated the default regex match to be |
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.
looks great! Thanks @ddsjoberg
thank you @ayogasekaram !! |
What changes are proposed in this pull request?
construct_model()
,reformulate2()
(similar tostats::reformulate()
but adds backticks around variable names with spaces in them),bt()
(adds backtics to variable as needed), andbt_strip()
(removes backticks from character variable names).I also updated
ard_survey_svychisq()
to usereformulate2()
instead ofstats::reformulate()
which allows variable names with spaces in them. Other instances ofstats::reformulate()
should also be updated in the future.The reason we're adding the constructors is because the full ARS (Analysis Result Standard) requires that we begin with a data frame, and these help us take a data frame, a response variable, and covariates to construct complex models.
Reference GitHub issue associated with pull request. e.g., 'closes #'
closes #108
Pre-review Checklist (if item does not apply, mark is as complete)
usethis::pr_merge_main()
ard_*()
function was added, it passes the ARD structural checks fromcards::check_ard_structure()
.devtools::test_coverage()
Reviewer Checklist (if item does not apply, mark is as complete)
devtools::test_coverage()
When the branch is ready to be merged:
NEWS.md
with the changes from this pull request under the heading "# cardx (development version)
". If there is an issue associated with the pull request, reference it in parentheses at the end update (seeNEWS.md
for examples).