From pd@|gd @end|ng |rom gm@||@com  Tue Aug  6 10:21:22 2019
From: pd@|gd @end|ng |rom gm@||@com (peter dalgaard)
Date: Tue, 6 Aug 2019 10:21:22 +0200
Subject: [Rd] Potential bug in update.formula when updating offsets
In-Reply-To: <CAGoSky9QAyfxW6bxzkVACQGX95SR2H-9rt2H2+EnF_Db_tDcLg@mail.gmail.com>
References: <CAGoSky9QAyfxW6bxzkVACQGX95SR2H-9rt2H2+EnF_Db_tDcLg@mail.gmail.com>
Message-ID: <5F1A2594-68E6-4A5B-A4C7-AC964474966B@gmail.com>

Terry, Martin

Would this happen to be related to the "indexing term objects" issue that has been bothering you?

-pd

> On 5 Aug 2019, at 21:44 , Paul Buerkner <paul.buerkner at gmail.com> wrote:
> 
> Hi all,
> 
> update.formula does not seem to correctly update (i.e. remove in my case)
> offset terms.
> 
> Here is an example:
> 
> update(~x + offset(z), ~ . - offset(z))
>> ~x + offset(z)
> 
> Also:
> update(~x, ~ . - offset(z))
>> ~x + offset(z)
> 
> In both cases, I would expect the result
>> ~x
> 
> as  - <term>  should remove <term> from the formula as happens for instance
> in:
> 
> update(~x + z, ~ . - z)
>> ~x
> 
> I don't know if this behavior is intentional but I would say it is at least
> unfortunate.
> 
> Paul
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



[Rd] Potential bug in update.formula when updating offsets
peter dalgaard