Learn R Programming

latrend (version 1.3.0)

timeVariable: Extract the time variable

Description

Extracts the time variable (i.e., column name) from the given object.

Usage

# S4 method for lcMethod
timeVariable(object, ...)

# S4 method for lcModel timeVariable(object)

Arguments

object

The object to extract the variable from.

...

Additional arguments.

Value

The time variable name, as character.

See Also

Other lcModel variables: idVariable(), responseVariable()

Examples

Run this code
# NOT RUN {
method <- lcMethodLMKM(Y ~ Time, id = "Id", time = "Time")
timeVariable(method) # "Time"
data(latrendData)
method <- lcMethodLMKM(Y ~ Time, id = "Id", time = "Time")
model <- latrend(method, latrendData)
idVariable(model) # "Id"
# }

Run the code above in your browser using DataLab