View source: R/points.jointdata.R
points.jointdata | R Documentation |
jointdata
plotAdd points to an existing plot of an object of class
jointdata
, for a longitudinal variable. It is possible plot all the
subjects in the data set, or just a selected subset
. See
subset.jointdata
.
## S3 method for class 'jointdata' points(x, Y.col, ...)
x |
object of class |
Y.col |
column number, or column name, of longitudinal variable to be
plotted. Defaults to |
... |
other graphical arguments; see |
A graphical device with a plot for longitudinal data. Other functions
are useful to be used with this as plot
and
lines
.
Ines Sousa
data(heart.valve) heart.surv <- UniqueVariables(heart.valve, var.col = c("fuyrs", "status"), id.col = "num") heart.long <- heart.valve[, c(1, 4, 5, 7, 8, 9, 10, 11)] heart.jd <- jointdata(longitudinal = heart.long, survival = heart.surv, id.col = "num", time.col = "time") # Randomly select a pair of subjects to plot profiles of take <- sample(1 : max(heart.jd$survival$num), 2) heart.jd.1 <- subset(heart.jd, take[1]) heart.jd.2 <- subset(heart.jd, take[2]) plot(heart.jd.1, Y.col = "grad", type = "p") points(heart.jd.2, Y.col = "grad", col = "blue", pch = 20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.