mplot | R Documentation |
Function to plot multiple growth curves indexed by subject id.
mplot(x, y, id, data = parent.frame(), subset = NULL, add = FALSE, ...)
x |
vector of x coordinates. |
y |
vector of y coordinates. |
id |
factor denoting subject levels. |
data |
optional dataframe containing |
subset |
optional logical defining a subset of rows in |
add |
optional logical defining whether the plot is pre-existing (TRUE) or new (FALSE). |
... |
Further graphical parameters (see |
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
.
Tim Cole tim.cole@ucl.ac.uk
mplot(age, height, id, heights, col=id)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.