test_summarize_linear_contrasts | R Documentation |
Test for linear trend across ordered factor with contrasts
test_summarize_linear_contrasts(x, y)
x |
vector |
y |
ordered factor |
a list with two components: p.value and method
Dan Chaltiel
library(dplyr)
my_test_args=crosstable_test_args()
my_test_args$test_summarize = test_summarize_linear_contrasts
iris %>%
mutate(Petal.Width.qt = paste0("Q", ntile(Petal.Width, 5)) %>% ordered()) %>%
crosstable(Petal.Length ~ Petal.Width.qt, test=TRUE, test_args = my_test_args)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.