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

From: Andrew Clausen <clausen_at_econ.upenn.edu>
Date: Mon 12 Dec 2005 - 21:16:20 GMT

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



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Tue Dec 13 08:25:22 2005

This archive was generated by hypermail 2.1.8 : Tue 13 Dec 2005 - 02:21:28 GMT