data <- data.frame(
rep = rep(1:3, each = 12),
irrigation = rep(rep(c("I1", "I2", "I3"), each = 4), 3),
variety = rep(c("V1", "V2", "V3", "V4"), 9),
yield = rnorm(36, 1200, 150)
)
anova_spd(data, response = "yield", main_plot = "irrigation",
sub_plot = "variety", replication = "rep")
Run the code above in your browser using DataLab