Learn R Programming

asremlPlus (version 4.4.46)

getFormulae.asreml: Gets the formulae from an asreml object.

Description

Gets the formulae nominated in the which argument from the call stored in an asreml object.

Usage

# S3 method for asreml
getFormulae(asreml.obj, which = c("fixed", "random", "residual"), 
            expanded = FALSE, envir = parent.frame(), ...)

Value

A list containing a component with each of the extracted

formula(e), the name of a component being the formula

that it contains.

Arguments

asreml.obj

An object resulting from the fitting of a model using asreml.

which

A character listing the formula(e) to be extracted from the call stored in asreml.obj. it should be some combination of fixed, random, residual, sparse and all. If all is included then all formula(e) will be returned, those not having been specified in the call being NULL.

expanded

A logical indicating whether terms are to be expanded to the sum of a set of individual terms.

envir

The environment in which the formula(e) are to be evaluated. May also be NULL, a list, a data.frame, a pairlist or an integer as specified to sys.call.

...

Arguments passed on to update.formula and ultimately to terms.formula.

Author

Chris Brien

See Also

printFormulae.asreml

Examples

Run this code
if (FALSE) {
   data(Wheat.dat)
   current.asr <- asreml(yield ~ Rep + WithinColPairs + Variety, 
                         random = ~ Row + Column + units,
                         residual = ~ ar1(Row):ar1(Column), 
                         data=Wheat.dat)
    getFormulae(current.asr)
}

Run the code above in your browser using DataLab