[R] histogramm?
Rolf Turner
rolf at math.unb.ca
Wed Jun 1 13:26:59 CEST 2005
Gavin Simpson wrote:
<snip>
> 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).
>
> So freq = FALSE plots relative frequencies (probabilities).
Careful! You left out the quote marks on ``probabilities''.
These are ***CRUCIAL*** inasmuch as the values are NOT
probabilities, but rather probability ***densities***.
Which, as I recall Bill Venables once pointed out to me, is
the only thing that makes sense. If you are doing a
histogram, you are looking at a continuous random variable.
If the variate in question is discrete, so that you
***really*** want probabilities, you should be doing a
barplot.
cheers,
Rolf Turner
rolf at math.unb.ca
More information about the R-help
mailing list