Open rorywhite200 opened 10 months ago
We can actually clean up the output and format it into a tibble with broom's tidy() function (see: https://cran.r-project.org/web/packages/broom/vignettes/broom.html)
There are also other formatting packages out there (I've used the flextable package before but there are many more: https://rfortherestofus.com/2019/11/how-to-make-beautiful-tables-in-r)
Thanks Mona! I will create a branch to edit the analysis file and add tidy formatting to our tests
Thanks for implementing that Rory! Typically for APA format, 3 decimal places is more than sufficient for reporting purposes (although we're losing precision, I think at some point having more decimal places does make the result less readable). That being said, there should be options to change the output so we can get more decimal places if needed (see: https://stackoverflow.com/a/60004882)
Wonderful suggestion! I will also try to make this change on the t test part.
It seems it has already been done~ Thanks @rorywhite200
I was wondering if there is anything we can do to improve the print out from our Pearson's test and t-test. Wrapping them in a function prevents them from displaying the actual column names and instead shows the
data: data %>% pull({ { col1 } }) and data %>% pull({ { col2 } })
(see example below). This may be an inevitable part of needlessly wrapping the tests in functions. What do you think?Pearson's product-moment correlation
data: data %>% pull({ { col1 } }) and data %>% pull({ { col2 } }) t = 5.0431, df = 312, p-value = 3.892e-07 alternative hypothesis: true correlation is greater than 0 95 percent confidence interval: 0.1862952 1.0000000 sample estimates: cor 0.2745402