[Rd] subscripting a terms object
Martin Maechler
m@ech|er @end|ng |rom @t@t@m@th@ethz@ch
Fri Apr 5 09:46:27 CEST 2019
Dear Terry,
>>>>> Therneau, Terry M , Ph D via R-devel
>>>>> on Thu, 4 Apr 2019 22:48:49 -0400 writes:
> Someone sent me a bug report for survival2.44.1-1 that involves a model with both cluster
> and offset. It turns out to be a 3 part issue with [.terms and my own untangle.specials
> routine. I've spent an evening sorting out the details.
> 1. The delete.response() function doesn't remove the response from the dataClasses
> attribute, which leads to a later failure in [.terms for no-response models. Is there a
> reason for this, or can I make my patch include this oversight as well?
> 2. [.terms messes up predvars and dataClasses if the model has an offset term in it.
> (In select cases 1 and 2 can cancel out and give the correct dataClasses attribute.)
The above two seem interesting and relevant to R itself.
As we've recently just fixed a buglet in reformulate() --
probably unrelated to your problem -- I'd really be interested to see a
repr.ex. (reproducible example) for the above two statements.
... and if you want also a proposal on how to address the
problem in delete.response() and/or `[.terms`()
Martin
> 3. The survival::untangle.specials routine assumed that you can use the same
> subscripting for the terms of a model and the term() object itself, which turns out to be
> almost always true, but only almost.
> The failure turns out to have probably been there since the Splus days, which tells one
> just how often such a model is used. (One of two edge case bugs sent to me in the first
> days after I pushed it to CRAN: a new release seems to attact them.) I'm willing to put
> together a patch, but given the rarity of these would folks prefer to wait until after the
> April release? I'm fine with that. I need the answer to 1 though.
> Terry T.
More information about the R-devel
mailing list