pheno2covar {cape}R Documentation

Create a covariate from a trait

Description

This function takes a variable from the phenotype matrix for example, diet treatment or sex and converts it to a covariate.

Usage

pheno2covar(data_obj, pheno_which)

Arguments

data_obj

a Cape object

pheno_which

vector of trait names to be used as covariates

Value

Returns the data object with the specified traits removed from the phenotype matrix and transferred where they will be used as covariates. Information about assigned covariates can be retrieved with get_covar.

Examples

## Not run: 
#convert weight to a covariate
data_obj <- pheno2covar(data_obj, "weight")

## End(Not run)

[Package cape version 3.1.0 Index]