[Rd] No is.formula()
Martin Maechler
maechler at stat.math.ethz.ch
Thu Aug 26 09:22:50 CEST 2004
>>>>> "tony" == A J Rossini <rossini at blindglobe.net>
>>>>> on Wed, 25 Aug 2004 14:33:23 -0700 writes:
tony> "Warnes, Gregory R"
tony> <gregory_r_warnes at 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".
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
More information about the R-devel
mailing list