Learn R Programming

latrend (version 1.6.1)

timeVariable: Extract the time variable

Description

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

Usage

timeVariable(object, ...)

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

# S4 method for lcModel timeVariable(object)

# S4 method for ANY timeVariable(object)

Value

The time variable name, as character.

Arguments

object

The object.

...

Not used.

See Also

Other variables: idVariable(), responseVariable()

Examples

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

Run the code above in your browser using DataLab