Learn R Programming

latrend (version 1.3.0)

idVariable: Extract the trajectory identifier variable

Description

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

Usage

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

# S4 method for lcModel idVariable(object)

Arguments

object

The object to extract the variable from.

...

Not used.

Value

The trajectory identifier name, as character.

See Also

Other lcModel variables: responseVariable(), timeVariable()

Examples

Run this code
# NOT RUN {
method <- lcMethodLMKM(Y ~ Time, id = "Traj")
idVariable(method) # "Traj"

method <- lcMethodRandom("Y", id = "Id", time = "Time")
model <- latrend(method, latrendData)
idVariable(model) # "Id"
# }

Run the code above in your browser using DataLab