Re: [Rd] No is.formula()

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Thu 26 Aug 2004 - 17:42:22 EST


On Thu, 26 Aug 2004, Martin Maechler wrote:

> >>>>> "tony" == A J Rossini <rossini@blindglobe.net>
> >>>>> on Wed, 25 Aug 2004 14:33:23 -0700 writes:
>
> tony> "Warnes, Gregory R"
> tony> <gregory_r_warnes@groton.pfizer.com> writes:
> >> There appears to be no "is.formula()" function in
> >> R-1.9.1. May I suggest that
> >>
> >> is.formula <- function(x) inherits(x, "formula")
> >>
> >> be added to base, since formula is a fundimental R type?
>
> tony> why not just
>
> tony> is(x,"formula")
> tony> ?
>
> because the latter needs the methods package and base functions
> must work independently of "methods".

(It would be a `stats' function, I believe, but equally true.)

> The question is what "fundamental R type" would be exactly.
> But I tend to agree with Greg, since formulae are constructed
> via the .Primitive '~' operator.

> Apropos, I believe we should move the is.primitive function
> from "methods" to "base".

Given how long we have lived without either (methods needs is.primitive for its internal workings, only) I believe we should continue to do so.

May I remind people that our aim is for base to be as lean as possible, since we now use R *a lot* for computations during installation, checking etc. This discourages adding trivial wrappers like these, especially to base.

-- 
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@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Thu Aug 26 17:46:32 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:45:10 EST