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

drawNestedBars

Display nested bars


Description

Displays the nested bars for barNest.

Usage

drawNestedBars(x,start,end,shrink=0.1,errbars=FALSE,intervals=TRUE,col=NA,
 labelcex=1,lineht=NULL,showall=TRUE,Nwidths=FALSE,barlabels=NULL,
 showlabels=TRUE,arrow.cap=NA)

Arguments

x

One level of the breakdown produced by brkdnNest.

start,end

The left and right x coordinates for the bar or group of bars to be displayed.

shrink

The proportion to shrink the width of the bars at each level.

errbars

Whether to display error bars on the bars.

intervals

Whether to use offsets or absolute values when displaying measures of dispersion.

col

The colors to use to fill the bars. See Details.

labelcex

Character size for the group labels.

lineht

The height of a margin line in user units.

showall

Whether to display the bars at any levels above the last.

Nwidths

Whether to scale the widths of the bars to the number of observations.

barlabels

Optional labels to display below the bars.

showlabels

Whether to display the labels below the bars.

arrow.cap

The width of the "cap" on error bars in user units, defaulting to 0.01 of the width of the plot.

Details

drawNestedBars displays the bars for the nested breakdown performed by brkdnNest. It starts at the top of the list and calls itself for each level of the breakdown. It is unlikely to be useful for anything else.

The combination of showlabels=TRUE and showall=FALSE allows the display of all of the labels below the plot with only the last set of bars being displayed. To have a set of labels not displayed, pass explicit barlabels and have zero length labels for the level that is not to have labels.

Value

nil

Author(s)

Jim Lemon and Ofir Levy

See Also


plotrix

Various Plotting Functions

v3.8-1
GPL (>= 2)
Authors
Jim Lemon, Ben Bolker, Sander Oom, Eduardo Klein, Barry Rowlingson, Hadley Wickham, Anupam Tyagi, Olivier Eterradossi, Gabor Grothendieck, Michael Toews, John Kane, Rolf Turner, Carl Witthoft, Julian Stander, Thomas Petzoldt, Remko Duursma, Elisa Biancotto, Ofir Levy, Christophe Dutang, Peter Solymos, Robby Engelmann, Michael Hecker, Felix Steinbeck, Hans Borchers, Henrik Singmann, Ted Toal, Derek Ogle, Darshan Baral, Ulrike Groemping, Bill Venables
Initial release
2021-01-21

We don't support your browser anymore

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