# Data preparation
df <- ToothGrowth
df$dose <- as.factor(df$dose)
# Compute ANOVA
res.aov <- aov(len ~ supp*dose, data = df)
summary(res.aov)
# Effect size
eta_squared(res.aov)
partial_eta_squared(res.aov)
Run the code above in your browser using DataLab