The data type longitudinal stores multiple time series data. It allows repeated
measurements, irregular sampling, and unequal temporal spacing of the time points.
as.longitudinal converts a matrix into a longitudinal object. The columns of the
input matrix are considered as individual variables (time series). The rows contain the
measurements in temporal order (for instance, rows 1-10 could contain 10 repeated measurements taken at
time point 1, rows 11-20 further 10 measurements taken at time point 2, and so on).
The dates for the time points can be specified with the argument times and need not
be equally spaced. With the argument repeats it is possible to specify the number
of measurements per time point (this may be different from time point to time point). In the resulting
longitudinal matrix object the row names will indicate both the time points and the
repetition number (e.g., "10-1", "10-2", "10-3", …, "20-1", "20-2", "20-3", etc.).
is.longitudinal checks whether a matrix has the longitudinal attributes.
The functions summary, print, plot are the standard generic functions
adapted to longitudinal objects.