R/coefficient_of_determination.R
coefficient_of_determination.Rd
coefficient_of_determination
calculate variance of a genotype across environments.
coefficient_of_determination(data, trait, genotype, environment)
a dataframe containing trait, genotype and environment.
colname of a column containing a numeric vector of interested trait to be analysized.
colname of a column containing a character or factor vector labeling different genotypic varieties
colname of a column containing a character or factor vector labeling different environments
a data table with coefficient of determination
Coefficient of determination (Pinthus, 1976) is calculatd based on regression function. Variety with low coefficient of determination is considered as stable. Equation of coefficient of determination can be found in vignette file.
Pinthus MJ (1973). “Estimate of genotypic value: A proposed method.” Euphytica, 22(1), 121--123. ISSN 1573-5060, doi: 10.1007/BF00021563 .
data(Data)
coef.of.determination <- coefficient_of_determination(
data = Data,
trait = "Yield",
genotype = "Genotype",
environment = "Environment")