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. ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel