# 5x5 Latin Square
data <- data.frame(
row = rep(1:5, each = 5),
col = rep(1:5, 5),
treatment = c("A","B","C","D","E", "B","C","D","E","A",
"C","D","E","A","B", "D","E","A","B","C",
"E","A","B","C","D"),
yield = rnorm(25, 1200, 100)
)
anova_latin(data, response = "yield", treatment = "treatment",
row = "row", column = "col")
Run the code above in your browser using DataLab