panel.superpose.bubble: Panel function for bubble plots

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

panel.superpose.bubbleR Documentation

Panel function for bubble plots

Description

Panel function to create bubble plots where the symbol size varyies in proportion to a variable

Usage

panel.superpose.bubble(
  x,
  y,
  n,
  groups,
  subscripts,
  cols = NULL,
  syms = NULL,
  ...
)

Arguments

x, y

numeric vectors x and y

n

the column containing the sample ie of each record

groups

grouping levels

subscripts

subscripts

cols

bubble colors

syms

bubbles symbol types

...

passed to llines() and lpoints()

Value

Lattice panel output (invisible)

Examples

library(lattice)
myData = data.frame(  n = c(5,100,332,12,50,74)
, value = c(0.13,0.78,0.49,0.67,0.34,0.57)
, dose = c(20,25,50,30,40,35)
, sex = rep(c("M","F"), ea = 3)
)
myData = expand.data(myData, values = c(0,1,2,3,4), name = "time")
myData$ypred = myData$value * myData$time ^3/(1 + myData$time^3)
xyplot(ypred ~ time
       , data = myData
       , groups = dose
       , subscripts = TRUE
       , nn = sqrt(myData$n/10)
       , panel = function(x,y, nn = nn, groups, subscripts,...)
       {
         panel.superpose.bubble(x,y,nn, groups, subscripts, ...)
       }
)

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