View source: R/environmental_variance.R
environmental_variance | R Documentation |
environmental_variance
is used to calculate variance of a genotype across environments.
environmental_variance(data, trait, genotype, unit.correct = FALSE)
data |
a dataframe containing trait, genotype and environment. |
trait |
colname of a column containing a numeric vector of interested trait to be analysized. |
genotype |
colname of a column containing a character or factor vector labeling different genotypic varieties |
unit.correct |
logical, default is |
Environmental variance (Roemer, 1917) is calculated by squared and suming up all deviation from genotypic mean for each genotype. The larger the environmental variance of one genotype is, the lower the stability. Equation of environmental variance can be found in vignette file.
a data table with environmental variance
Tien-Cheng Wang
roemer1917toolStability
data(Data)
environmental.variance <- environmental_variance(
data = Data,
trait = "Yield",
genotype = "Genotype",
unit.correct = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.