sort_terms | R Documentation |
Sort rows in ANOVA or regression tables produced by apa_print()
by complexity (i.e., main effects, two-way interactions, three-way interactions, etc.).
sort_terms(x, colname)
x |
A data frame. For example, the table element produced by |
colname |
Character. Column name of the |
Returns the same data.frame
with reordered rows.
## From Venables and Ripley (2002) p. 165.
npk_aov <- aov(yield ~ block + N * P * K, npk)
npk_aov_results <- apa_print(npk_aov)
sort_terms(npk_aov_results$table, "term")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.