Learn R Programming

sommer (version 4.1.4)

transformConstraints: transformConstraints

Description

transformConstraints takes a list of matrices with constraints and transforms all the non-zero values to the value desired. The purpose of this function is to make easy the transformation of initial constraints to a fixed-constraint list to be provided to a mixed model fitted with the mmer function.

Usage

transformConstraints(list0,value=1)

Arguments

list0

a list of matrices with constraints according to the rules specified in the vs function (0: not to be estimated, 1: positive, 2:unconstrained, 3:fixed).

value

value to be used to replace all the non-zero values in the constraint matrices.

Value

$res

a list with the modified constraint matrices.

References

Covarrubias-Pazaran G (2016) Genome assisted prediction of quantitative traits using the R package sommer. PLoS ONE 11(6): doi:10.1371/journal.pone.0156744

See Also

The function vs to know how to use transformConstraints in the mmer solver.

Examples

Run this code
# NOT RUN {
(a <- list(unsm(4), diag(4)))
transformConstraints(a, value=3)
# }

Run the code above in your browser using DataLab