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?
Gregory R. Warnes
Manager, Non-Clinical Statistics
Pfizer Global Research and Development
LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}
No is.formula()
4 messages · Warnes, Gregory R, A.J. Rossini, Martin Maechler +1 more
"Warnes, Gregory R" <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?
why not just
is(x,"formula")
?
best,
-tony
Anthony Rossini Research Associate Professor rossini@u.washington.edu http://www.analytics.washington.edu/ Biomedical and Health Informatics University of Washington Biostatistics, SCHARP/HVTN Fred Hutchinson Cancer Research Center UW (Tu/Th/F): 206-616-7630 FAX=206-543-3461 | Voicemail is unreliable FHCRC (M/W): 206-667-7025 FAX=206-667-4812 | use Email CONFIDENTIALITY NOTICE: This e-mail message and any attachme...{{dropped}}
"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".
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
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