| desc_tests | R Documentation |
Add test statistics to a grouped desc_table, with the tests specified as variable = test.
desc_tests(desctable, .auto = tests_auto, .default = NULL, ...)
desctable |
A desc_table |
.auto |
A function to automatically determine the appropriate tests |
.default |
A default fallback test |
... |
A list of statistical tests associated to variable names |
A desc_table with tests
The statistical test functions to use in the table are passed as additional named arguments. Tests must be preceded
by a formula tilde (~).
name = ~test will apply test test to variable name.
Any R test function can be used, as long as it returns an object containing a p.value element, which is the
case for most tests returning an object of class htest.
Users can also use purrr::map-like formulas as quick anonymous functions (eg. ~ t.test(., var.equal = T) to
compute a t test without the Welch correction.
tests_auto
no.test
ANOVA
Other desc_table core functions:
desc_output(),
desc_table()
iris %>%
group_by(Species) %>%
desc_table() %>%
desc_tests(Sepal.Length = ~kruskal.test,
Sepal.Width = ~oneway.test,
Petal.Length = ~oneway.test(., var.equal = T),
Petal.Length = ~oneway.test(., var.equal = F))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.