Learn R Programming

latrend (version 1.3.0)

lcModels: Construct a flat (named) list of lcModel objects

Description

The lcModels S3 class represents a list of lcModel objects. This makes it easier to work with a set of models in a more structured manner.

The lcModels() function takes the inputs and generates a named lcModels object containing a list of the input models. Duplicates are preserved.

Usage

lcModels(...)

Arguments

...

lcModel, lcModels, or a recursive list of lcModel objects. Arguments may be named.

Value

A lcModels object containing all specified lcModel objects.

See Also

Other lcModel list functions: as.lcModels(), print.lcModels(), subset.lcModels()

Examples

Run this code
# NOT RUN {
data(latrendData)
lmkmMethod <- lcMethodLMKM(Y ~ Time, id = "Id", time = "Time")
lmkmModel <- latrend(lmkmMethod, latrendData)
rngMethod <- lcMethodRandom("Y", id = "Id", time = "Time")
rngModel <- latrend(rngMethod, latrendData)

lcModels(lmkmModel, rngModel)

lcModels(defaults = c(lmkmModel, rngModel))
# }

Run the code above in your browser using DataLab