Learn R Programming

sommer (version 2.9)

at: at functionality

Description

This function creates internally the incidence matrices for specific locations when using mmer2.

Usage

at(x, levs)

Arguments

x

a column of a dataframe.

levs

levels of the columns to keep after using the model.matrix() function.

Value

$dd

an incidence matrix with columns for the specific levels specified.

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 core functions of the package mmer and mmer2

Examples

Run this code
# NOT RUN {
data(cornHybrid)
hybrid2 <- cornHybrid$hybrid # extract cross data
head(hybrid2)
modFD <- mmer2(Yield~1, random=~at(Location,c("3","4")):GCA2, data=hybrid2)
summary(modFD)
# }

Run the code above in your browser using DataLab