Test for linear trend across ordered factor with contrasts
test_summarize_linear_contrasts(x, y)
x
: vectory
: ordered factora list with two components: p.value and method
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)
Dan Chaltiel
Useful links