test_that("eaym/seaym compute expected columns", { skip_on_cran() df <- data.frame(genotype = rep(paste0("G",1:4), each=3), env = rep(paste0("E",1:3), times=4), yield = c(700,720,710, 650,640,660, 800,790,805, 600,610,595)) ez <- eaym(df, "genotype","env","yield") expect_true(all(c("xbar_i","z_ij") %in% names(ez))) stab <- seaym(ez, "genotype") expect_true(all(c("genotype","xbar","zbar","SEAYM") %in% names(stab))) }) test_that("fm_compute adds FM columns and plots run", { skip_on_cran() set.seed(1) df <- data.frame(genotype = rep(paste0("G",1:8), each=4), env = rep(paste0("E",1:4), times=8), yield = rnorm(32, 700, 50)) ez <- eaym(df, "genotype","env","yield") stab <- seaym(ez, "genotype") fm <- fm_compute(stab) expect_true(all(c("FMEAYM","FMSEAYM","dFM") %in% names(fm))) # plotting should not error pdf(NULL) expect_silent(plot_stability(stab)) expect_silent(plot_fm_biplot(stab)) expect_silent(plot_dfm_biplot(stab)) dev.off() })