From therne@u @end|ng |rom m@yo@edu  Fri Apr  5 19:09:11 2019
From: therne@u @end|ng |rom m@yo@edu (Therneau, Terry M., Ph.D.)
Date: Fri, 05 Apr 2019 12:09:11 -0500
Subject: [Rd] all.equal failure and [.terms
In-Reply-To: <4ee47f6c-e1c8-73c6-ba67-1feb97cf4e48@gmail.com>
References: <b23057$belnhe@ironport10.mayo.edu>
 <7b627c90-1bbf-b2a5-5ddc-391711f5208e@gmail.com>
 <b23057$bemifh@ironport10.mayo.edu>
 <8eced21f-bd54-1675-8122-b2119e36f901@gmail.com>
 <b23057$bems3o@ironport10.mayo.edu>
 <4ef61872-a213-7205-673c-fbc6a65d98ae@gmail.com>
 <23719.30050.351411.6577@stat.math.ethz.ch>
 <4ee47f6c-e1c8-73c6-ba67-1feb97cf4e48@gmail.com>
Message-ID: <b23057$beog18@ironport10.mayo.edu>

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]]



[Rd] all.equal failure and [.terms
Therneau, Terry M., Ph.D.