Transform or extract the trajectories from the given object to a standardized format.
The standardized data format is for method estimation by latrend, and for plotting functions.
trajectories(
object,
id = idVariable(object),
time = timeVariable(object),
response = responseVariable(object),
...
)
# S4 method for data.frame
trajectories(
object,
id = idVariable(object),
time = timeVariable(object),
response = responseVariable(object),
...
)
# S4 method for matrix
trajectories(
object,
id = idVariable(object),
time = timeVariable(object),
response = responseVariable(object),
...
)
# S4 method for call
trajectories(object, ..., envir)
# S4 method for lcModel
trajectories(
object,
id = idVariable(object),
time = timeVariable(object),
response = responseVariable(object),
...
)
The data or model or extract the trajectories from.
The identifier variable name, see idVariable.
The time variable name, see timeVariable.
The response variable name, see responseVariable.
Not used.
The environment
used to evaluate the data object in (e.g., in case object
is of type call
).
A data.frame
with columns matching the id
, time
, and response
name arguments.
The generic function removes unused factor levels in the Id column, and any trajectories which are only comprised of NAs in the response.