I would like to run a Dunn test with the purrr package. However, the tidy function to extract the parameter/results seemed to do not work with this test. Any one has sugesstion for me?
My example.
df <- data.frame(Type = c("n1", "n1", "n2", "n2", "n3", "n3", "n4", "n4", "n1", "n1", "n2", "n2", "n3", "n3", "n4", "n4"),
group = c("gr1", "gr1", "gr1", "gr1", "gr1", "gr1", "gr1", "gr1", "gr2", "gr2", "gr2", "gr2", "gr2", "gr2", "gr2", "gr2"),
value = runif(16, min = 1, max = 30))
tbl <- df %>%
mutate(Type = factor(Type, levels = c("n1", "n2", "n3", "n4"))) %>%
nest(data = -group) %>%
mutate(fit = map(data, ~dunnTest(value~Type, data= .x, method = "bh")),
tidied = map(fit, tidy))
Error: Problem with `mutate()` column `tidied`.
i `tidied = map(fit, tidy)`.
x No tidy method for objects of class dunnTest
Run `rlang::last_error()` to see where the error occurred.