knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Identify the Experimental Design

The function check_design_met helps us to check the quality of the data and also to identify the experimental design of the trials. This works as a quality check or quality control before we fit any model.

library(agriutilities)
library(agridat)
data(besag.met)
dat <- besag.met
results <- check_design_met(
  data = dat,
  genotype = "gen",
  trial = "county",
  traits = "yield",
  rep = "rep",
  block = "block",
  col = "col",
  row = "row"
)
print(results)

Single Trial Analysis

The results of the previous function are used in single_trial_analysis() to fit single trial models.

obj <- single_trial_analysis(results, progress = FALSE)
print(obj)

Multi-Environmental Trial Analysis

The results of the previous function are used in met_analysis() to fit multi-environmental trial models.

met_results <- met_analysis(obj)
print(met_results)
if (requireNamespace("asreml", quietly = TRUE)) {
  met_results <- met_analysis(obj)
  print(met_results)
}


AparicioJohan/agriutilities documentation built on Jan. 20, 2025, 7:53 a.m.