From clausen at econ.upenn.edu  Sun Dec 11 08:40:01 2005
From: clausen at econ.upenn.edu (clausen@econ.upenn.edu)
Date: Sun, 11 Dec 2005 08:40:01 +0100 (CET)
Subject: [Rd] (PR#8376 inconsistency between plot(hist(...)) and
	hist(...)
Message-ID: <20051211074001.C7AFB15AA7@slim.kubism.ku.dk>

Hi Brian,

On Sun, Dec 11, 2005 at 04:34:50AM +0000, Prof Brian Ripley wrote:
> 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)

Ah, thanks for the explanation.

I didn't occur to me to check the plot.histogram() help page.  Besides,
even if I had read it, I still don't think the semantics would have been
clear to me without additional experimentation.

Perhaps it might be helpful to document in the hist() help page which
attributes are stored in the hist() object.  Alternatively/additionally, 
hist() could emit a warning or error if plot=FALSE and irrelevant
(non-stored) attributes are set.

Cheers,
Andrew



[Rd] (PR#8376 inconsistency between plot(hist(...)) and hist(...)
clausen@econ.upenn.edu