-
-
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
357 stat methods vignette #365
base: main
Are you sure you want to change the base?
357 stat methods vignette #365
Conversation
Even just creating this PR I can see there's some grammar/spellings that need fixing - I'll do another pass to fix all that but please let me know if the content is what we're after @ddsjoberg @bzkrouse |
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.
This is looking great!
Just a few initial comments
) | ||
``` | ||
|
||
The basic functions offered by {cards} can create a wide variety of ARDs. However, sometimes we may need to include the outputs from more complicated statistical methods in our ARDs. In this article we'll look at a few different ways to implement the output from these statistical methods. |
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.
Can we put each sentence on a new line? It makes it easier to track changes to the article in the future.
dplyr::mutate(context = "t_test_one_sample") | ||
``` | ||
|
||
Over 100 different statistical methods implemented in R are able to be 'tidied' using `broom::tidy`. However, the method you aim to use might not be, or the current `broom::tidy` implementation might not contain the information that you need to be in your ARD. In that case we'll have to format the output ourselves. |
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.
Should we make the distinction that only broom::tidy()
methods that return a single row of results work here?
|
||
As an example, let's write a function which carries out a Wilcoxon signed rank test over one variable using the function `wilcox.test`. As an output we just want to record the method and the p-value. | ||
|
||
```{r wilcox-function} |
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.
Would this be easier to read as wilcox_one_var <- \(x) wilcox.test(x)[c("method", "p.value")]
What changes are proposed in this pull request?
#357 Add an article detailing how a user can implement their own statistical methods
I'll open this as a draft for now as it would be good just to get a review on the content initially if you have time @ddsjoberg?
Also a couple of points/questions:
{cardx}
example, which would mean adding{cardx}
to Suggests. I'm happy to remove, just couldn't remember exactly what we agreed on in the last meeting.as_cards_fn
being new and installation restrictions on our SCE - if this is important then I should be able to work around it to render the articlecloses #357
Pre-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).