| tidy.rstatix_test | R Documentation |
tidy() and glance() methods for objects of class
rstatix_test — the result of a test function such as
t_test(), wilcox_test(),
anova_test() or kruskal_test(). The results are
already tidy tibbles; these methods drop the internal rstatix classes
and the stashed test arguments so the object passes cleanly to tools that
dispatch on tidy / glance,
such as broom, gtsummary and gt. Correlation results
(cor_test(), cor_mat()) carry a different class
and are not covered by these methods.
## S3 method for class 'rstatix_test'
tidy(x, ...)
## S3 method for class 'rstatix_test'
glance(x, ...)
x |
an object of class |
... |
not used; present for compatibility with the generics. |
tidy() returns the same result as a plain tibble, one row per
comparison or model term, with the internal classes and the args
attribute removed. glance() returns a one-row tibble with the test
method and n, the number of rows in the result (the number of
comparisons or model terms).
res <- ToothGrowth %>% t_test(len ~ dose)
# A plain tibble, ready for broom / gtsummary / gt
tidy(res)
# One-row summary
glance(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.