-
-
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 as_cards_fn()
function
#361
Conversation
Unit Test Performance Difference
Additional test case details
Results for commit 2947ba4 ♻️ This comment has been updated with latest results. |
Unit Test Performance Difference
Additional test case details
Results for commit d069f10 ♻️ This comment has been updated with latest results. |
Unit Tests Summary 1 files 178 suites 48s ⏱️ Results for commit 13aa0c4. ♻️ This comment has been updated with latest results. |
Code Coverage Summary
Diff against main
Results for commit: 13aa0c4 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
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.
@ddsjoberg Love how simple this is!!
YES! I was excited to see how simple it was to implement! 👯 @jtalboys while writing the article about creating ARD functions for statistical methods we haven't added to cardx, you'll want to include the use of this functionality. You'll be the first to use it in practice, so please note anything you feel could be a smoother user experience! |
What changes are proposed in this pull request?
as_cards_fn()
,is_cards_fn()
, andget_cards_fn_stat_names()
. These functions assist is creating functions with attributes enumerating the expected results.ard_continuous()
andard_complex()
to return full ARDs when functions passed are created withas_cards_fn()
: instead of a single row output, we get a long ARD with rows for each of the expected statistic names. (How to specify the expected returned statistics for cases when there are errors? #316)Reference GitHub issue associated with pull request. e.g., 'closes #'
closes #316
NOTE: We had spoken about including an argument for specifying the formatting function as well, which is not included. It turns out the fmt_fn are assigned a very different part of the function, and it would have required so strange gymnastics to utilize this information. Also, both
ard_continuous()
andard_complex()
have afmt_fn
argument where the formatting functions can be specified.After this update is live, we can also begin updating a bunch of {cardx} functions, so when errors occur we continue to get the structure of ARD we expect without errors as well. Most ARD functions wrap either
ard_continuous()
andard_complex()
internally FYIPre-review Checklist (if item does not apply, mark is as complete)
usethis::pr_merge_main()
devtools::test_coverage()
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()
When the branch is ready to be merged:
NEWS.md
with the changes from this pull request under the heading "# cards (development version)
". If there is an issue associated with the pull request, reference it in parentheses at the end update (seeNEWS.md
for examples).