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

Paul Buerkner p@u|@buerkner @end|ng |rom gm@||@com
Mon Aug 5 21:44:23 CEST 2019

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)

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

update(~x + z, ~ . - z)
> ~x

I don't know if this behavior is intentional but I would say it is at least


	[[alternative HTML version deleted]]

More information about the R-devel mailing list