ARTool
ARTool copied to clipboard
How to get rownames from anova()
When rownames_to_column() is called on the anova results, the text is replaced with numbers.
# make some data
expand.grid(
aaa = LETTERS[1:4],
bbb = LETTERS[1:4],
subject = 1:10
) %>%
mutate_all(factor) %>%
mutate(measure = rnorm(n())) %>%
# ART ANOVA
art(measure ~ aaa * bbb + Error(subject/bbb), .) %>%
anova() %>%
# get row names as a column
rownames_to_column()
There are numbers instead of text:

Workaround: Calling ... %>% cbind(.) will put the rowname in a column named Term.
Yeah, it's admittedly a bit obscure, but that column is there already and can be referred to by name (pass the data structure to str() to see it)