[Rd] Evaluation puzzle

Terry Therneau therneau at mayo.edu
Fri Nov 12 00:08:51 CET 2010

  The answer came from Gabor -- the model.frame function has a
non-standard evaluation, in that it uses the enviromnent attached to the
formula as the "enclosure" for looking up variable names.
  This is clearly documented and I somehow missed it when reading the
page.  So "reading deficit" is the true root of my query.  I scratched
my head for a couple of hours before sending for help. 

   Also a typo in my stripped down example -- I forgot the as.formula()
wrapper which is in the actual survexp function.  This added a red
herring to the discussion.

Terry T.

More information about the R-devel mailing list