Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

panel.likert

Panel functions for likert that include a stackWidth argument


Description

panel.barchart2 is based on panel.barchart
The changes are
* the heights in each horizontal stacked bar are constant.
* the widths in each vertical stacked bar are constant.
* the panel.barchart heights and widths are based on the box.width argument.
* the panel.barchart2 heights and widths when stack==TRUE are also based on the new stackWidth argument.

panel.likert calls panel.barchart2

scaling of stackWidth:
stackWidth <- stackWidth/mean(stackWidth) ## and maybe smaller with another /2

Usage

panel.barchart2(x, y, box.ratio = 1, box.width = box.ratio/(1 + box.ratio),
    horizontal = TRUE, origin = NULL, reference = TRUE, stack = FALSE,
    groups = NULL,
    col = if (is.null(groups)) plot.polygon$col else superpose.polygon$col,
    border = if (is.null(groups)) plot.polygon$border else superpose.polygon$border,
    lty = if (is.null(groups)) plot.polygon$lty else superpose.polygon$lty,
    lwd = if (is.null(groups)) plot.polygon$lwd else superpose.polygon$lwd,
    ..., identifier = "barchart",
          stackWidth=NULL)

panel.likert(..., horizontal=TRUE, reference.line.col="gray65")

Arguments

x, y, box.ratio, box.width, horizontal, origin, reference, stack, groups, col

See panel.barchart.

border, lty, lwd, identifier

See panel.barchart.

...

Extra arguments, if any, for panel.barchart.

stackWidth

Heights in each horizontal stacked bar, when stack=TRUE, are constant and specified by this argument. We recommend starting with
stackWidth <- stackWidth/mean(stackWidth) and adjusting as seems appropriate.

reference.line.col

See likert.

Author(s)

Richard M. Heiberger <rmh@temple.edu>

See Also


HH

Statistical Analysis and Data Display: Heiberger and Holland

v3.1-43
GPL (>= 2)
Authors
Richard M. Heiberger
Initial release
2020-11-27

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.