Learn R Programming

latrend (version 1.1.0)

dcastRepeatedMeasures: Cast a longitudinal data.frame to a matrix

Description

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.

Usage

dcastRepeatedMeasures(
  data,
  response,
  id = getOption("latrend.id"),
  time = getOption("latrend.time")
)

Arguments

data

The matrix containing a trajectory on each row.

response

The response column name.

id

The id column name.

time

The time column name.

Value

A matrix with a trajectory per row.