data <- expand.grid(
variety = paste0("V", 1:10),
location = paste0("L", 1:5),
rep = 1:3
)
data$yield <- rnorm(nrow(data), 1200, 200)
stability_analysis(data, genotype = "variety", environment = "location",
replication = "rep", trait = "yield", method = "all")
Run the code above in your browser using DataLab