[Rd] (PR#8376 inconsistency between plot(hist(...)) and hist(...)
ripley@stats.ox.ac.uk
ripley at stats.ox.ac.uk
Sun Dec 11 05:35:07 CET 2005
On Sun, 11 Dec 2005 clausen at econ.upenn.edu wrote:
> Full_Name: Andrew Clausen
> Version: 2.1.0
> OS: Debian GNU/Linux
> Submission from: (NULL) (71.242.192.73)
>
>
> Hi,
>
> When I type
>
> hist(x, freq=F)
>
> I get a density function, as I expect. However, if I type
>
> plot(hist(x, freq=F))
>
> then I get the same output as if I had typed:
>
> hist(x, freq=T)
>
> I expect that the second command should have the same semantics as the first.
And it actually does, but your usage does not.
Did you check the help page? ?plot.histogram shows plot.histogram has a
'freq' argument, and the correct usage is
plot(hist(x), freq=FALSE)
--
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-devel
mailing list