HH (version 2.1-6)

bwplot.formula: Replacement for bwplot.formula and compute.packet in R to allow them to work with the new "positioned" class.

Description

Replacement for bwplot.formula and compute.packet in R trellis to allow them to work with the new "positioned" class.

Usage

## S3 method for class 'formula':
bwplot(x, data = NULL, allow.multiple = is.null(groups) || 
    outer, outer = FALSE, auto.key = FALSE, aspect = "fill", 
    panel = "panel.bwplot", prepanel = NULL, scales = list(), 
    strip = TRUE, groups = NULL, xlab, xlim, ylab, ylim, box.ratio = 1, 
    horizontal = NULL,
    drop.unused.levels = lattice.getOption("drop.unused.levels"), 
    ...,
    default.scales =
      if (horizontal)
        list(y = list(tck = 0, alternating = FALSE, rot = 0))
      else
        list(x = list(tck = 0, alternating = FALSE)),
    subscripts = !is.null(groups), 
    subset = TRUE)

compute.packet.new(cond, levels, cond.levels)

Arguments

x, data, allow.multiple, outer, auto.key, aspect, panel, prepanel, scales, strip, groups, xlab, xlim, ylab, ylim, box.ratio, horizontal, drop.unused.levels, ..., default.scales, subscripts, subset
cond, levels
standard values used by lattice:::compute.packet.
cond.levels

Value

Details

bwplot makes the assumption that the numeric equivalent of a factor f are always integers from the sequence seq(1:length(levels(f))). When the "positioned" class is introduced, this is no longer the right assumption. The numeric values need to be chosen from the "position" attribute.

See Also

bwplot.formula.

Examples

Run this code
if.R(r={
print(
  bwplot(len ~ supp | unpositioned(dose), data=ToothGrowth, layout=c(3,1))
)
print(
  bwplot(len ~ dose | supp, data=ToothGrowth, layout=c(2,1),
         box.ratio=.5,
         panel=panel.bwplot.intermediate.hh,
         scales=list(x=list(at=position(ToothGrowth$dose))))
)
print(
  bwplot(len ~ dose | supp, data=ToothGrowth, layout=c(2,1),
         box.ratio=.5,
         scales=list(x=list(at=position(ToothGrowth$dose))))
)
},
s={}
)

Run the code above in your browser using DataCamp Workspace