Last chance! 50% off unlimited learning
Sale ends in
Draws a histogram of a numeric variable per level of a factor.
byf.hist(formula, data, sep = FALSE, density = TRUE, xlab = NULL, ylab = NULL,
col = NULL)a formula of the form a ~ b where a gives the data values and b a factor giving the corresponding groups.
an optional data frame containing the variables in the formula formula. By default the variables are taken from environment(formula).
logical. If TRUE a histogram is displayed per level of the factor. If FALSE all levels are displayed on the same histogram.
logical. If TRUE density polygons are displayed, if FALSE classical counts are displayed.
label for x-axis (name of the response variable as default).
label for y-axis ("Density" or "Frequency" as default, depending on the type of histogram).
color(s) used for density curves or bars.
# NOT RUN {
data(iris)
byf.hist(Sepal.Length~Species,data=iris)
# }
Run the code above in your browser using DataLab