From ccberry @ending from uc@d@edu  Tue May  1 20:48:26 2018
From: ccberry @ending from uc@d@edu (Berry, Charles)
Date: Tue, 1 May 2018 18:48:26 +0000
Subject: [Rd] [EXTERNAL] Re: issue with model.frame()
In-Reply-To: <bb6fa2$9bcetc@ironport10.mayo.edu>
References: <bb6fa2$9b935h@ironport10.mayo.edu>
 <EF41437C-933A-44C7-86C0-992953B39E9E@ucsd.edu>
 <bb6fa2$9bcetc@ironport10.mayo.edu>
Message-ID: <6F61CD6E-A88D-4146-8937-61B30B804C48@ucsd.edu>

Unfortunately, I spoke too soon.

model.frame calls formula <- terms(formula, data = data) if formula does not inherit from class "terms" as in your case.

And that is where the bad terms.labels attribute comes from.

So, the fix I suggested won't work.

But maybe you can just supply a terms object to model.frame that has correct term.labels.

Chuck


> On May 1, 2018, at 10:55 AM, Therneau, Terry M., Ph.D. via R-devel <r-devel at r-project.org> wrote:
> 
> Great catch.  I'm very reluctant to use my own model.frame, since that locks me into tracking all the base R changes, potentially breaking survival in a bad way if I miss one.




[Rd] [EXTERNAL] Re: issue with model.frame()
Berry, Charles