
Last chance! 50% off unlimited learning
Sale ends in
stackTrait
creates a dataset stacking traits in the long format to be
used with the mmes
solver for multi-trait models.
stackTrait(data, traits)
a data frame with traits in long format.
a data frame with traits in wide format.
variable names corresponding to the traits that should be in the long format.
Giovanny Covarrubias-Pazaran
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
data(DT_example)
DT <- DT_example
A <- A_example
head(DT)
DT2 <- stackTrait(DT, traits = c("Yield","Weight"))
head(DT2)
Run the code above in your browser using DataLab