Learn R Programming

papaja (version 0.1.0.9479)

sort_effects: Sort ANOVA table by effects

Description

Sorts rows in ANOVA table produced by apa_print by complexity (i.e., main effects, two-way interactions, three-way interactions, etc.).

Usage

sort_effects(x)

Arguments

x
data.frame. An arbitrary data.frame with a column named "Effect", e.g., a table element produced by apa_print.

Value

Returns the same data.frame with reordered rows.

Examples

Run this code
## From Venables and Ripley (2002) p. 165.
npk_aov <- aov(yield ~ block + N * P * K, npk)
npk_aov_results <- apa_print(npk_aov)
sort_effects(npk_aov_results$table)

Run the code above in your browser using DataLab