From ripley@stats.ox.ac.uk  Tue Sep 19 18:47:18 2000
From: ripley@stats.ox.ac.uk (Prof Brian D Ripley)
Date: Tue, 19 Sep 2000 18:47:18 +0100 (BST)
Subject: [Rd] Re: more experience with formulas
In-Reply-To: <14791.38667.631499.957513@gargle.gargle.HOWL>
Message-ID: <Pine.GSO.4.05.10009191842450.29971-100000@auk.stats>

On Tue, 19 Sep 2000, Martin Maechler wrote:

> >>>>> "WSt" == Werner Stahel <stahel@stat.math.ethz.ch> writes:
> [to me privately]
> 
>     WSt> I do not want to call this a bug, but it bugged me. Please try the
>     WSt> following:
> 
>  WSt>  tform <- sqrt(RADAI) ~ sqrt(RADAI.e) + TAGE.ej + SPITAL + ARZT + DAS28 + 
>  WSt>     SJC + TJC + DGA + HAQ + PGA + PAIN + YEAR.SYM + YEAR.DIA + 
>  WSt>     ALTER + IndV + m.NSAIDs + m.Stereoids + DM.Cyclosp + DM.Penic
>  WSt> 
>  WSt>  as.character(tform) 
> 
> --> length-3 vector "~" "<LHS>" "<RHS>".
> However, the end of <RHS> is TRUNCATED!
> and that truncation of the third part is a bug in my opinion.

I think using as.character() is the problem: this is what deparse() is
for.  Similar things happen in S too.  You may notice that in
versions of R up to and including 1.1.1 that anova methods had this bug:
I even filed a bug report against it.

I suspect it may be relatively unproblematic to change as.character because
where it matters the cognescenti (read, `the much-bitten') would
use deparse() anyway.

-- 
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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] Re: more experience with formulas
Prof Brian D Ripley