groupHist: Histogramm for classes

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/groupHist.R

Description

Improvement of tapply(x, g, hist) with x and g taken from a data.frame

Usage

1
2
groupHist(df, x, g, xlab = "", ylab = "", las = 1, main = NULL,
  unit = NA, ...)

Arguments

df

data.frame object name

x

column name of variable of interest

g

column name of groups (INDEX in tapply, f in split)

xlab, ylab

axis labels. DEFAULT: ""

las

LabelAxisStyle, see par. DEFAULT: 1, means numbers on y-axis upright

main

Main title, internal default based on d, x, unit and g. DEFAULT: NULL

unit

Unit to be written into the default title. DEFAULT: NA

...

further arguments passed to hist

Details

Uses split to categorize into groups.

Value

NULL, used for plotting

Author(s)

Berry Boessenkool, berry-b@gmx.de, Jan 2015

See Also

hist, tapply

Examples

1
2
3
4
groupHist(chickwts, weight, "feed", col=2)
groupHist(chickwts, "weight", "feed", col=2, unit="grams at age 6 weeks")
groupHist(chickwts, weight, feed, col=2, breaks=20, main="Hi there")
groupHist(iris, Petal.Width, Species)


berryFunctions documentation built on May 20, 2017, 4:12 a.m.
Search within the berryFunctions package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.