
Last chance! 50% off unlimited learning
Sale ends in
Function to plot multiple growth curves indexed by subject id.
mplot(x, y, id, data = parent.frame(), subset = NULL, add = FALSE, ...)
vector of x coordinates.
vector of y coordinates.
factor denoting subject levels.
optional dataframe containing x
, y
and id
.
optional logical defining a subset of rows in data
.
optional logical defining whether the plot is pre-existing (TRUE) or new (FALSE).
Further graphical parameters (see par
) may also
be supplied as arguments, particularly background colour bg
,
character expansion cex
, colour col
, line type lty
,
line width lwd
and character pch
.
The arguments x
, y
and id
can be given as character
strings. The par
parameters can be functions of vector
variables in data
, e.g. to colour curves separately by id
use:
col = id
.
# NOT RUN {
mplot(age, height, id, heights, col=id)
# }
Run the code above in your browser using DataLab