panel.function.demo | R Documentation |
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
).
require(grid)
require(lattice)
pp <- panel.function.demo()
pp
pp[[3]]
sec.delay: |
Delay between the plots. |
A Lattice plot
Claus E. Andersen
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.