From therneau at mayo.edu  Fri Nov 12 00:08:51 2010
From: therneau at mayo.edu (Terry Therneau)
Date: Thu, 11 Nov 2010 17:08:51 -0600
Subject: [Rd] Evaluation puzzle
In-Reply-To: <4CDC6EC7.9080208@gmail.com>
References: <201011112008.oABK8xjk025512@punchbuggy.mayo.edu>
	<4CDC6EC7.9080208@gmail.com>
Message-ID: <1289516931.29759.51.camel@punchbuggy>

Kevin,
  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.



[Rd] Evaluation puzzle
Terry Therneau