Re: [Rd] (PR#8376 inconsistency between plot(hist(...)) and hist(...)

From: <ripley_at_stats.ox.ac.uk>
Date: Sun 11 Dec 2005 - 04:35:07 GMT


On Sun, 11 Dec 2005 clausen@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@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

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Sun Dec 11 15:40:19 2005

This archive was generated by hypermail 2.1.8 : Mon 20 Feb 2006 - 03:21:34 GMT