[R] ?hist
Owen, Jason
wowen at richmond.edu
Tue Sep 2 16:15:51 CEST 2003
Hello R users,
When using the hist() function, by default the y-axis
displays the counts for each bin (assuming equal bin
sizes). By adding 'probability = TRUE' or 'freq = FALSE,
the y-axis displays the density (relative freq. / bin size),
but the help file for hist() seems to suggest that this
argument will display the relative frequency:
freq: logical; if `TRUE', the histogram graphic is a representation
of frequencies, the `counts' component of the result; if
`FALSE', relative frequencies (``probabilities''),
component`density', are plotted. Defaults to `TRUE' iff
`breaks' are equidistant (and `probability' is not
specified).
I understand that displaying the density is important
when the bin sizes are not all equal, but I think the help
file is not clear with what this argument does.
Jason
--
Assistant Professor of Statistics
Mathematics and Computer Science Department
University of Richmond, Virginia 23173
(804) 289-8081 fax:(804) 287-6664
http://www.mathcs.richmond.edu/~wowen
More information about the R-help
mailing list