panel.function.demo: Demonstration of how to write a panel function (subscripts...

panel.function.demoR Documentation

Demonstration of how to write a panel function (subscripts and groups)

Description

This function demonstrate how to write a panel function that takes care of subscripts and groups. The main trick is to always use:

panel = function(x, y, subscripts, groups,...)

subscripts are always available, but groups may not be, so to mitigate that simply use:

if(missing(groups)){ panel.xyplot(x, y, ...)} else { panel.superpose(x, y, subscripts,groups, ...) }#if

The use of panel.number(), current.row, and current.column() is also demonstrated.

Further tricks:

par.strip.text(cex=1.2)

and

how to get data in and out of a panel using assign and get to the top environment (df.outside).

Usage

require(grid)
 require(lattice)
 pp <- panel.function.demo()
 pp
 pp[[3]]

Arguments

sec.delay:

Delay between the plots.

Value

A Lattice plot

Author(s)

Claus E. Andersen


claus-e-andersen/clanLattice documentation built on Oct. 14, 2023, 10:41 a.m.