lim_bars: Limits bar plot

View source: R/lim_bars.R

lim_barsR Documentation

Limits bar plot

Description

Graphic of bars showing the range (minimum and maximum values) of a variable 'y' along segments of a second 'x' variable.

Usage

lim_bars(
  x,
  y,
  breaks = 10,
  pos = NULL,
  horiz = FALSE,
  poly_args = list(),
  pos_args = list(),
  na.rm = FALSE,
  ...
)

Arguments

x

Either a numeric vector or a matrix with two columns.

y

A numeric vector. If missing the second column of 'x' will be used instead.

breaks

An integer value indicating the number of segments used to split 'x'.

pos

A function used to determine the position of the segment. For instance 'mean' or 'median' can be used. By default no position will be displayed.

horiz

A logical value indicating whether bars should be drawn horizontally or vertically.

poly_args

A list including arguments to be passed to polygon(). This will affect the layout of the bars.

pos_args

A list including arguments to be passed to segments(). This will affect the layout of the position lines.

na.rm

A logical value indicating whether NA values in 'x' and 'y' should removed or not.

...

Further arguments passed to plot().


kamapu/Lexiguel documentation built on July 29, 2022, 7:52 p.m.