[R] hist() basic question
ripley at stats.ox.ac.uk
Sat Mar 8 19:22:42 CET 2003
A histogram has area one, not sum one. From ?truehist
This plots a true histogram, a density estimate of total area 1.
On Sat, 8 Mar 2003, juli g. pausas wrote:
> This is a very basic question, but I would like to undestand hist(). I
> thought that the hist( , freq=FALSE) should provide the relative
> frequencies (probabilities), and so they should sum 1, however:
> ah <- hist(rnorm(100), freq=F)
>  2
> bh <- hist(rlnorm(100), freq=F)
>  0.4999996
> I'm getting similar figures with truehist() in MASS.
> So I suppose I'm misunderstanding hist(). Any help?
> R-help at stat.math.ethz.ch mailing list
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help