Skip to content
Prev 12453 / 398502 Next

frames and formulas

Kevin Murphy <murphyk at cs.berkeley.edu> writes:
Jonathan Li reported the same thing just three days ago on R-help. It
happens because tree uses the S-PLUS form of passing the frame number
of the parent (i.e. eval(model, sys.parent())) rather than the parent
environment, which conspires with an age-old bug in R that makes this
work only on the command line. The quick fix is to modify the tree
function to use eval(model, parent.frame()) instead. This is better R
style anyway, but we'll get around to fixing eval() eventually.