plotProfiles {mixAK} | R Documentation |
Plot individual longitudinal profiles
Description
It creates a plot of individual longitudinal profiles. It
is based on the output from getProfiles
function.
Usage
plotProfiles(ip, data, var, trans, tvar, gvar,
auto.layout=TRUE, lines=TRUE, points=FALSE, add=FALSE,
xlab="Time", ylab, xaxt="s", yaxt="s", xlim, ylim, main,
lcol, col, bg, lty=1, lwd=1, pch=21, cex.points=1,
highlight, lines.highlight=TRUE, points.highlight=TRUE,
lcol.highlight="red3", col.highlight="red3", bg.highlight="orange",
lty.highlight=1, lwd.highlight=2,
pch.highlight=23, cex.highlight=1)
Arguments
ip |
output from |
data |
|
var |
character string identifying the response variable to plot. |
trans |
possible transformation of the response variable. |
tvar |
character string identifying the time variable. |
gvar |
character string identifying the group variable for which different colors are used. |
auto.layout |
logical. If |
lines |
logical. If |
points |
logical. If |
add |
logical. If |
lcol |
color for lines. |
col |
color for points. |
xlab , ylab , xaxt , yaxt , xlim , ylim , main , bg , lty , lwd , pch |
arguments passed to
standard plotting functions. |
cex.points |
passed as a |
highlight |
an optional numeric vector giving the indeces of
|
lines.highlight |
logical. If |
points.highlight |
logical. If |
lcol.highlight , col.highlight , bg.highlight , lty.highlight , lwd.highlight , pch.highlight , cex.highlight |
arguments |
Value
Invisible ip
.
Author(s)
Arnošt Komárek arnost.komarek@mff.cuni.cz
See Also
Examples
data(PBCseq, package="mixAK")
ip <- getProfiles(t="day", y=c("age", "fdrug", "bili", "platelet", "spiders"),
id="id", data=PBCseq)
XLIM <- c(0, 910)
lcol2 <- c("darkgreen", "red")
oldPar <- par(mfrow=c(1, 3), bty="n")
plotProfiles(ip=ip, data=PBCseq, xlim=XLIM, var="bili", trans=log, tvar="day", gvar="fdrug",
xlab="Time (days)", col=lcol2, auto.layout=FALSE, main="Log(bilirubin)",
highlight=c(2, 4), col.highlight="darkblue")
plotProfiles(ip=ip, data=PBCseq, xlim=XLIM, var="platelet", tvar="day", gvar="fdrug",
xlab="Time (days)", col=lcol2, auto.layout=FALSE, main="Platelet count",
highlight=c(2, 4), col.highlight="darkblue")
plotProfiles(ip=ip, data=PBCseq, xlim=XLIM, var="spiders", tvar="day", gvar="fdrug",
xlab="Time (days)", col=lcol2, auto.layout=FALSE,
lines=FALSE, points=TRUE,
highlight=c(2, 4), col.highlight="darkblue", bg.highlight="skyblue")
par(oldPar)