Converts a longitudinal data.frame comprising trajectories with an equal number of observations,
measured at identical moments in time, to a matrix. Each row of the matrix represents a trajectory.
tsmatrix(
data,
response,
id = getOption("latrend.id"),
time = getOption("latrend.time"),
fill = NA
)dcastRepeatedMeasures(
data,
response,
id = getOption("latrend.id"),
time = getOption("latrend.time"),
fill = NA
)
A matrix with a trajectory per row.
The matrix containing a trajectory on each row.
The response column name.
The id column name.
The time column name.
A scalar value.
If FALSE, an error is thrown when time series observations are missing in the data frame.
Otherwise, the value used for representing missing observations.
tsframe