Convert a multiple time series matrix to a data.frame

tsframe(
  data,
  response,
  id = getOption("latrend.id"),
  time = getOption("latrend.time"),
  ids = rownames(data),
  times = colnames(data),
  as.data.table = FALSE
)

meltRepeatedMeasures(
  data,
  response,
  id = getOption("latrend.id"),
  time = getOption("latrend.time"),
  ids = rownames(data),
  times = colnames(data),
  as.data.table = FALSE
)

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.

ids

A vector specifying the id names. Should match the number of rows of data.

times

A numeric vector specifying the times of the measurements. Should match the number of columns of data.

as.data.table

Whether to return the result as a data.table, or a data.frame otherwise.

Value

A data.table or data.frame containing the repeated measures.

Note

The meltRepeatedMeasures() function is deprecated and will be removed in a future version, please use tsframe() instead.

See also