Re: [Rd] No is.formula()

From: Martin Maechler <>
Date: Thu 26 Aug 2004 - 17:22:50 EST

>>>>> "tony" == A J Rossini <> >>>>> on Wed, 25 Aug 2004 14:33:23 -0700 writes:

    tony> "Warnes, Gregory R"
    tony> <> 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".

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".

Martin mailing list Received on Thu Aug 26 17:28:15 2004

This archive was generated by hypermail 2.1.8 : Fri 18 Mar 2005 - 08:59:23 EST