r i = {{i}}

{{i+1}}. Analysis for variable r vars[i]

lc <- ck.abd(dfr, vars[i], geno, rep)

# Remove checks without data or with only one datum

if (lc$nck.0 > 0 | lc$nck.1 > 0) {
  tmp <- dfr[!(dfr[, geno] %in% c(lc$ck.0, lc$ck.1)), ]
} else {
  tmp <- dfr
}

# Remove missing values for DAU.test

tmp <- tmp[!is.na(tmp[, vars[i]]), ]

# Fit model

y <- tmp[, vars[i]]
model <- agricolae::DAU.test(tmp[, rep], tmp[, geno], y)

{{i+1}}.1. General setting

r if(lc$nmis == 0 & lc$nmis.ck == 0) {"For this variable there are no missing values."} r if(lc$nmis == 1) {"There is one genotype with missing value. This genotype has been removed."} r if(lc$nmis > 1) paste("There are", lc$nmis, "genotypes with missing values. These genotypes have been removed.") r if(lc$nmis > 0) paste("Therefore, there are", lc$ng - lc$nmis, "genotypes included in the analysis.")

r if(lc$nck.0 == 1) paste0("There is one check without data: ", lc$ck.0, ". This check has been removed.") r if(lc$nck.0 > 1) paste0("There are ", lc$nck.0, " checks without data: ")

if(lc$nck.0 > 1)
  lc$ck.0

r if(lc$nck.0 > 1) {"These checks have been removed."}

r if(lc$nck.1 == 1) paste0("There is one check with data in only one block: ", lc$ck.1, ". Checks need at least two replications so this check has been removed.") r if(lc$nck.1 > 1) paste0("There are ", lc$nck.1, " checks with data in only one block: ")

if(lc$nck.1 > 1)
  lc$ck.1

r if(lc$nck.1 > 1) {"Checks need at least two replications so these checks have been removed."}

{{i+1}}.2. Adjusted means

model$means

{{i+1}}.3. Overall mean and CV

model$statistics

{{i+1}}.4. LSD test

model$groups


reyzaguirre/pepa documentation built on March 29, 2025, 9:56 p.m.