strip_combined: Generate a combined strip for lattice plots

Description Usage Arguments Value Author(s) Source Examples

View source: R/strip_combined.R

Description

This function create a combined strip when two factor are used after the conditional operator em lattice functions (y ~ x | A + B).

Usage

1
strip_combined(which.given, which.panel, factor.levels, var.name, ...)

Arguments

which.given, which.panel, factor.levels, var.name, ...

See strip.custom().

Value

A combined strip for trellis plot.

Author(s)

Walmes Zeviani, walmes@ufpr.br.

Source

This function entirely based on a message in the R-help mailing list: http://r.789695.n4.nabble.com/merging-plot-labels-in-a-lattice-plot-td2276609.html.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
library(lattice)

da <- expand.grid(A = gl(2, 10), B = gl(3, 1))
da$x <- runif(nrow(da))
da$y <- rnorm(nrow(da), mean = da$x, sd = 1)

xyplot(y ~ x | A + B, data = da)

xyplot(y ~ x | A + B,
       data = da,
       strip = strip_combined,
       par.settings = list(layout.heights = list(strip = 0.5)))

walmes/wzRfun documentation built on Aug. 10, 2021, 2:19 p.m.