View source: R/panel.superpose.arrows.r
panel.superpose.arrows | R Documentation |
Panel function for hysteresis plots grouped by individual. The function is basically the arrow analogue of panel.superpose.
panel.superpose.arrows(x, y, subscripts, groups, ...)
x, y |
numeric vectors x and y |
subscripts |
unused |
groups |
grouping levels |
... |
unused |
Lattice panel output (invisible)
library(lattice)
pat.1.avg.cdin = c(.1,.3,.45,.6,.7,.7,.6,.45,.3,.1)
pat.1.avg.cp.ipred = c(1,2,3,4,5,4.5,3.5,2.5,1.5,1)
pat.2.avg.cdin = c(.1,.3,.45,.6,.7,.7,.6,.45,.3,.1) + .2
pat.2.avg.cp.ipred = c(1,2,3,4,5,4.5,3.5,2.5,1.5,1)
plot.ds = data.frame(
id = rep(c(1,2),each = 10),
avg.cdin = c(pat.1.avg.cdin,pat.2.avg.cdin),
avg.cp.ipred = c(pat.1.avg.cp.ipred,pat.2.avg.cp.ipred)
)
trellis.strip.color()
plot(xyplot(avg.cdin*100 ~ avg.cp.ipred,
plot.ds,
groups = id,
panel = panel.superpose.arrows,
ylim = c(-25,115),
scales = list(x = list(relation = "free")),
as.table = TRUE,
xlab = list("Mean of Indiv Predicted Drug Concentration (nmol/L)", cex = 1.2),
ylab = list("Mean Thingy Inhibition (%)", cex = 1.2)
))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.