[Rd] [EXTERNAL] Re: Potential bug in update.formula when updating offsets
Therneau, Terry M., Ph.D.
therne@u @end|ng |rom m@yo@edu
Tue Aug 6 14:46:05 CEST 2019
Yes, it is almost certainly the same issue. At useR I promised Martin that I would put
together a clear example and fix for him and I have not yet done so. I will try to do
that this week.
The heart of the issue is that in a terms object the offset expression will apear in
the 'variables' attribute but not in the 'term.labels' or 'order' attributes, and the base
code tries to use the same subscripting vector for all 3 if then. The same bit of code
shows up in update.formula and in [.formula; a fix for one can be applied to both.
I had all this worked out, then had some problems logging into buzilla, then sent it to
Martin about the same time 2-3 more urgent things got dumped on him, and then we've both
let it lie. At useR he said (and I've no reason to disagree) that my prior note was
unclear. Let me recreate the example and fix, more carefully.
On 8/6/19 3:21 AM, peter dalgaard wrote:
> Terry, Martin
> Would this happen to be related to the "indexing term objects" issue that has been bothering you?
>> On 5 Aug 2019, at 21:44 , Paul Buerkner <paul.buerkner using 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)
>> update(~x, ~ . - offset(z))
>>> ~x + offset(z)
>> In both cases, I would expect the result
>> as - <term> should remove <term> from the formula as happens for instance
>> update(~x + z, ~ . - z)
>> I don't know if this behavior is intentional but I would say it is at least
>> [[alternative HTML version deleted]]
>> R-devel using r-project.org mailing list
[[alternative HTML version deleted]]
More information about the R-devel