Displaying 1 result from an estimated 1 matches for "subfunc1_".
Did you mean:
subfunc1
2002 Sep 04
3
strange things with eval and parent frames
Dear mailing list,
I have found some strange behaviour which I think relates to parent frames
and eval. Can anyone explain what's going on here?
First example:
> test.parent.funcs_ function() {
outer.var_ 5
subfunc1_ function() substitute( outer.var, envir=parent.frame())
print( subfunc1())
subfunc2b_ function() eval( quote( outer.var), envir=parent.frame())
print( subfunc2b())
subfunc2_ function() evalq( outer.var, envir=parent.frame())
#print( subfunc2())
}
> test.parent.funcs()
[1] 5
[1] 5...