panel.avg.LP: Lattice panel function for average lines

panel.avg.LPR Documentation

Lattice panel function for average lines

Description

Panel function that can be used with xyplot() (lattice) and related functions to plot the average (or other metric) of y values at each X, while also drawing connecting lines and points. This is modified version of panel.average, and is used by panel.meanspag()

Usage

panel.avg.LP(
  x,
  y,
  fun = mean,
  horizontal = TRUE,
  lwd = reference.line$lwd,
  lty = reference.line$lty,
  col,
  col.line = reference.line$col,
  type = "l",
  ...,
  identifier = "linejoin",
  show.points = FALSE
)

Arguments

x, y

The regular x, y input for panel functions

fun

function to summarize by, defaults to mean

horizontal

logical (T) indicating if the average needs to be taken vertical or horizontal

lwd

line width (taken from trellis.par.get("reference.line"))

lty

line type (taken from trellis.par.get("reference.line"))

col

observed data color

col.line

line color (taken from trellis.par.get("reference.line"))

type

same as type in a lattice call (default is "l" for lines)

...

passed to panel.points() and panel.lines()

identifier

option to join lines (which is default)

show.points

logical indicating to show observed data dots

Value

Nothing -> internal to a lattice call


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