Covariates can be derived from either genetic markers or phenotypic values. This function generates covariates from phenotypes. These covariates are treated distinctly from those generated from genetic markers. For example, covariates derived from genetic markers are used in kinship calculations, whereas covariates derived from phenotypes are not. Covariates derived from phenotypes are also plotted after all genetic markers.
Usage
pheno2covar(data.obj, pheno.which)
Arguments
data.obj
The object in which all results are stored. See read.population.
pheno.which
A vector of character strings indicating which phenotypes should be converted to covariates.
Value
Returns the data object with two additional elements.
g.covar.table
A table of the covariates and their values.
p.covar
A vector of the names of the phenotypic covariates