| groupHist | R Documentation | 
Improvement of tapply(x, g, hist) with x and g taken from a data.frame
groupHist(
  df,
  x,
  g,
  xlab = "",
  ylab = "",
  breaks = 20,
  las = 1,
  main = NULL,
  unit = NA,
  col = "purple",
  ...
)
| df | data.frame object name | 
| x | column name of variable of interest | 
| g | column name of groups ( | 
| xlab,ylab | axis labels. DEFAULT: "" | 
| breaks | 
 | 
| las | LabelAxisStyle, see  | 
| main | Main title, internal default based on  | 
| unit | Unit to be written into the default title. DEFAULT: NA | 
| col | Color vector to be used, recycled. | 
| ... | further arguments passed to  | 
Uses split to categorize into groups.
NULL, used for plotting
Berry Boessenkool, berry-b@gmx.de, Jan 2015
hist, tapply
groupHist(chickwts, weight, "feed", col="salmon")
groupHist(chickwts, "weight", "feed", col=2, unit="grams at age 6 weeks")
groupHist(chickwts, weight, feed, col="khaki", breaks=5, main="Hi there")
groupHist(iris, Petal.Width, Species)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.