# \donttest{
library(metan)
model <- performs_ammi(data_ge, ENV, GEN, REP, resp = c(GY, HM))
# PC1 x PC2 (variable GY)
p1 <- plot_scores(model)
p1
# PC1 x PC2 (variable HM)
plot_scores(model,
var = 2, # or "HM"
type = 2)
# Nominal yield plot (variable GY)
# Draw a convex hull polygon
plot_scores(model, type = 4)
# Unbalanced data (GEN 2 in E1 missing)
mod <-
data_ge %>%
remove_rows(4:6) %>%
droplevels() %>%
performs_ammi(ENV, GEN, REP, GY)
p2 <- plot_scores(mod)
arrange_ggplot(p1, p2, tag_levels = list(c("Balanced data", "Unbalanced data")))
# }
Run the code above in your browser using DataLab