Message-ID: <b23057$beog18@ironport10.mayo.edu>
Date: 2019-04-05T17:09:11Z
From: Terry Therneau
Subject: all.equal failure and [.terms
In-Reply-To: <4ee47f6c-e1c8-73c6-ba67-1feb97cf4e48@gmail.com>
The all.equal was a side issue for me; I don't have strong opinions one way or the other.?
You are welcome to leave me out of the loop on that.? (Or leave me on the cc, whatever is
easiest).
?I will update the survival package once the [.terms issues are addressed.
?One debatable issues is the choice of change vs document for the offset() issue.? With
my proposed fix or without it, offsets are completely ignored by [.terms and dropterms.?
So with a formula of
?? z <- terms(y~ x1 + offset(x2) + x3)
the 2 in drop.terms(z, 2) or z[-2] refers to x3, and the result will drop both the offset
and x3.? For the use cases that I can think of the two functions are used at the 'build
the X matrix' stage, offsets have already been accounted for, and the present behavior is
fine.? My vote would be to document it with a few lines in the help file since that is the
easiest.? Offsets don't count as a 'term' in the assign attribute either so the current
behavior is consistent in that respect.
Terry T.
[[alternative HTML version deleted]]