panel.superpose.arrows: Panel function for hysteresis plots

View source: R/panel.superpose.arrows.r

panel.superpose.arrowsR Documentation

Panel function for hysteresis plots

Description

Panel function for hysteresis plots grouped by individual. The function is basically the arrow analogue of panel.superpose.

Usage

panel.superpose.arrows(x, y, subscripts, groups, ...)

Arguments

x, y

numeric vectors x and y

subscripts

unused

groups

grouping levels

...

unused

Value

Lattice panel output (invisible)

Examples

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)
))

qPharmetra/qpToolkit documentation built on May 24, 2023, 8:52 a.m.