metan (version 1.2.1)

anova_joint: Joint analysis of variance

Description

Performs a joint analysis of variance to check for the presence of genotype-vs-environment interactions.

Usage

anova_joint(.data, env, gen, rep, resp, verbose = TRUE)

Arguments

.data

The dataset containing the columns related to Environments, Genotypes, replication/block and response variable(s).

env

The name of the column that contains the levels of the environments. The analysis of variance is computed for each level of this factor.

gen

The name of the column that contains the levels of the genotypes.

rep

The name of the column that contains the levels of the replications/blocks.

resp

The response variable(s). To analyze multiple variables in a single procedure a vector of variables may be used. For example resp = c(var1, var2, var3).

verbose

Logical argument. If verbose = FALSE the code will run silently.

Value

A list where each element is the result for one variable containing the ANOVA table.

Examples

Run this code
# NOT RUN {
library(metan)
# traditional usage approach
anova1 = anova_joint(data_ge,
                     env = ENV,
                     gen = GEN,
                     rep = REP,
                     resp = GY)

# Using the pipe operator %>%
# Two variables, one run.
anova2 = data_ge %>% anova_joint(ENV, GEN, REP, c(GY, HM))


# }

Run the code above in your browser using DataLab