From p.dalgaard at biostat.ku.dk  Mon Aug 30 01:47:47 2004
From: p.dalgaard at biostat.ku.dk (Peter Dalgaard)
Date: Mon Aug 30 01:53:16 2004
Subject: [Rd] model.matrix.default chokes on backquote (PR#7202)
In-Reply-To: <20040828151500.1FE99394F@mprdmxin.myway.com>
References: <20040828151500.1FE99394F@mprdmxin.myway.com>
Message-ID: <x2sma5ld5o.fsf@biostat.ku.dk>

"Gabor Grothendieck" <ggrothendieck@myway.com> writes:

> > > as.character(attr(terms(`a(b)`~`c(d)`),"variables"))
> > [1] "list" "`a(b)`" "`c(d)`"
> > 
> > whereas for instance
> > 
> > > sapply(attr(terms(`a(b)`~`c(d)`),"variables")[-1],as.character)
> > [1] "a(b)" "c(d)"
> 
> 1. That is quite subtle but a fix based on that would appear to 
>    solve it.

Hmm, not quite. I tried, and terms like offset(foo) gets me in
trouble. Probably, I was fixing the wrong end of the original problem:
In the comparisons, we can't have one side with backquotes and the
other without them. That doesn't have to mean that they should be
removed from both sides, and indeed it would get us in trouble if
someone was perverse enough to do things like

 y ~ `offset(foo)` + offset(foo)

I.e. perhaps the real issue is that names(data) gets generated without
backquotes.

Anyways, this is a real can of worms and I'm not sure we're not too
close to 2.0.0 to start tampering with it...

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907


[Rd] model.matrix.default chokes on backquote (PR#7202)
Peter Dalgaard