Displaying 1 result from an estimated 1 matches for "012ddfc8".
2004 Nov 18
5
Lexical Scoping: eval(expr,envir=)
..., "a" would be a property of the object and "foo" one of it's
method.
Let instantiate one version of this object:
--
> tmp = myObject()
> tmp
$a
[1] 1
$foo
function(b)
{
cat("b:",b)
cat("\na:", a)
}
<environment: 012DDFC8>
--
Now I try to "invoke it's foo method" (definitively not a S terminology!)
For sure, tmp$foo() wont work, as it can't know anything about "a".
Reading eval() help page, It is said:
envir: the 'environment' in which 'expr' is to be evaluated. May...