From clausen at econ.upenn.edu  Mon Dec 12 22:16:20 2005
From: clausen at econ.upenn.edu (Andrew Clausen)
Date: Mon, 12 Dec 2005 16:16:20 -0500
Subject: [Rd] extension to missing()? {was "hist() ... helpful warning?
	(PR#8376)"}
In-Reply-To: <17309.23782.691038.586796@stat.math.ethz.ch>
References: <20051211074001.C7AFB15AA7@slim.kubism.ku.dk>
	<17309.23782.691038.586796@stat.math.ethz.ch>
Message-ID: <20051212211620.GB27693@econ.upenn.edu>

Hi Martin,

On Mon, Dec 12, 2005 at 12:20:06PM +0100, Martin Maechler wrote:
>     AndrewC> I didn't occur to me to check the plot.histogram()
>     AndrewC> help page.  
> 
> [ even though it's prominently mentioned on  help(hist)  ?? ]

Yes.  I expected plot.histogram() was something that no-one ever
calls directly (and I still expect that!), and I expected hist()
to pass everything on to plot.histogram().

I guess I think the most elegant design would be to remove all
plotting functionality from hist(), and put all arguments into
plot.histogram().  Or make histogram objects store everything.
But, I expect you can't changed this now, for compatability / user 
familiarity reasons...

>     AndrewC> Perhaps it might be helpful to document in the
>     AndrewC> hist() help page which attributes are stored in the
>     AndrewC> hist() object.  
> you mean the 'histogram' object.

Yes.

> Yes, that might be helpful; diffs against
>   https://svn.R-project.org/R/trunk/src/library/graphics/man/hist.Rd
> are welcome.

I added it to my R-TODO.  (I doubt I will be able to get to this
for about a year... I am at the oppressive beginning of an obnoxious
degree program!)

> and of course
>     is.miss <- lapply(formals(), function(n) missing(n))
> ``works'' but trivially {why ?} and hence not usefully.

R's introspection capabilities are a little mysterious to me.

The missing() docs mention that it should be improved in future.
That might be a better long-term solution?

Cheers,
Andrew



[Rd] extension to missing()? {was "hist() ... helpful warning? (PR#8376)"}
Andrew Clausen