
Last chance! 50% off unlimited learning
Sale ends in
Improvement of tapply(x, g, hist)
with x and g taken from a data.frame
groupHist(df, x, g, xlab = "", ylab = "", las = 1, main = NULL,
unit = NA, ...)
data.frame object name
column name of variable of interest
axis labels. DEFAULT: ""
LabelAxisStyle, see par
. DEFAULT: 1, means numbers on y-axis upright
Main title, internal default based on d, x, unit
and g
. DEFAULT: NULL
Unit to be written into the default title. DEFAULT: NA
further arguments passed to hist
NULL, used for plotting
Uses split
to categorize into groups.
# NOT RUN {
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)
# }
Run the code above in your browser using DataLab