plotHistogram: Plot a histogram for a column in a dataframe

Description Usage Arguments Details Value

Description

Function to plot a histogram for a column in a dataframe.

Usage

1
2
3
4
plotHistogram(dfr, x, label = "", fill = "grey50", binwidth = NULL,
  lines = NULL, colour = "black", linetype = 2, linesize = 1.25,
  showPct = FALSE, reverse = FALSE, flip = TRUE, facets = NULL,
  showPlot = FALSE)

Arguments

dfr

- dataframe

x

- name of column for histogram

label

- bin axis label

fill

- histogram bin colour

binwidth

- bin width for histogram

lines

- vector of (nominally vertical) reference line positions

colour

- colour for reference lines

linetype

- type for reference lines

linesize

- size for reference lines

showPct

- flag to include % observations falling outside lines as text on plot

reverse

- reverse bin order

flip

- flag to flip orientation

facets

- expression for faceting using facet_grid()

showPlot

- flag to print plot

Details

none.

Value

a ggplot2 object with an extra list element, 'xtra'. 'xtra' is a list with one element: pct.outside, which gives the % observations falling outside the range of the 'lines' (if specified), or NULL.


wStockhausen/wtsDisMELSConn documentation built on May 3, 2019, 7:36 p.m.