[Rd] Evaluation puzzle

Terry Therneau therneau at mayo.edu
Thu Nov 11 23:27:03 CET 2010

Gabor wrote: 
 At the above statement you have lost the environment of your formula.

>    m$formula <- tform

Replace this with:

m$formula <- as.formula(tform, environment(formula))

  No, I have not "lost" an environment.  I manufactured a formula which
lacked something needed, but without the necessary hint that I needed
it. But that is semantics:  A closer reread of help(model.frame) shows
that the documentation is there, I had missed it.
 I'm still puzzled by recover though.

Terry T.

More information about the R-devel mailing list