This function is primarily called for its side effect --- plotting a histogram or histograms --- but it also invisibly returns an object of class hist or a list of hist objects.
Arguments
x
a vector of values for which a histogram is to be plotted.
groups
a factor (or character or logical variable) to create histograms by group with common horizontal and vertical scales.
scale
the scaling of the vertical axis: "frequency" (the default), "percent", or "density".
This function is a wrapper for the hist function in the base package, permitting percentage scaling of the vertical axis in addition to frequency and density scaling.