convEffectNames2DataFrame.asreml {asremlPlus} | R Documentation |
Converts the effects names for a term stored in the component of an asreml
object into a data.frame
.
Description
Converts the effects names for a term stored in the component of an asreml
object into
a data.frame
that has a column for each factor and variable in the term.
It facilitates adding the effects to the data.frame
supplied to asreml
for an analysis. This function can only be used with asreml
v4.2 or later.
Usage
## S3 method for class 'asreml'
convEffectNames2DataFrame(asreml.obj, term, use = "design.matrix", sep = ":", ...)
Arguments
asreml.obj |
An object resulting from the fitting of
a model using |
term |
A |
use |
A |
sep |
A |
... |
Provision for passing arguments to functions called internally - not used at present. |
Value
A data.frame
with columns for the factors and variables in term
.
It includes the attribute effect.names
that contains the extracted effects names
for the term
Author(s)
Chris Brien
References
Butler, D. G., Cullis, B. R., Gilmour, A. R., Gogel, B. J. and Thompson, R. (2023). ASReml-R Reference Manual Version 4.2. VSN International Ltd, https://asreml.kb.vsni.co.uk/.
Examples
## Not run:
G.dat <- convEffectNames2DataFrame(m1.asr, term = "Row:Column", use = "G.aom")
G.dat <- lapply(c("at(Smarthouse, 'SW'):Lane:Position",
"at(Smarthouse, 'SE'):Lane:Position"),
function(term, asreml.obj)
tmp <- convEffectNames2DataFrame.asreml(asreml.obj, term = term),
asreml.obj = m1.asr)
G.dat <- do.call(rbind, G.dat)
## End(Not run)