panel.thalf | R Documentation |
Panel function to create individual plots with terminal half life predictions
panel.thalf(
x,
y,
...,
text.cex = 0.8,
line.col = "blue",
digits = 3,
unit = "hr"
)
x, y |
numeric vectors x and y |
... |
any other arguments passed on to the lattice call |
text.cex |
text font size |
line.col |
line color |
digits |
number of significant digits in output |
unit |
time unit (hr) |
Lattice panel output (invisible)
library(lattice)
pkpdData = example.pkpdData()
pkpdData$blq = 0
pkpdData$blq[pkpdData$type == "PK"&pkpdData$value<0.1] = 1
xyplot(value ~ time | id
, data = subset(pkpdData, blq == 0)
, subset = type == "PK" & dose == 100 & value > 1e-6
, groups = id
, panel = function(x,y, ...)
{
panel.xyplot(x,y,..., col = "gray", pch = 18, type = "b", cex = 1)
sel = length(x)
sel = seq(sel-3,sel)
panel.thalf(x[sel],y[sel],...,lwd = 2)
lpoints(x,y, col = steel)
}
, scales = list(y = list(log = 10))
, yscale.components = yscale.components.log10
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.