tidy.rstatix_test: Tidy an rstatix Test Result

View source: R/tidy_glance.R

tidy.rstatix_testR Documentation

Tidy an rstatix Test Result

Description

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.

Usage

## S3 method for class 'rstatix_test'
tidy(x, ...)

## S3 method for class 'rstatix_test'
glance(x, ...)

Arguments

x

an object of class rstatix_test, as returned by an rstatix test function.

...

not used; present for compatibility with the generics.

Value

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).

Examples

res <- ToothGrowth %>% t_test(len ~ dose)

# A plain tibble, ready for broom / gtsummary / gt
tidy(res)

# One-row summary
glance(res)


rstatix documentation built on July 24, 2026, 1:06 a.m.