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

Andrew Clausen clausen at econ.upenn.edu
Mon Dec 12 22:16:20 CET 2005


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



More information about the R-devel mailing list