sys.call(which=<<see below>>) sys.frame(which=<<see below>>) sys.nframe() sys.function(n=<<see below>>) sys.parent(n=1) sys.calls() sys.frames() sys.parents() sys.on.exit()
which
| the frame number. |
n
| the number of frame generations to go back. |
environments (``frames''
in S-speak) associated with functions further up the calling stack.
You need access to two different types of environments.
You need access to the environment where the arguments to a function
are defined; this is what sys.parent does.
You also need access to the environment where a function is being evaluated;
this is what sys.frame does.
Ox <- c("asfef", "qwerty", "yuiop[", "b", "stuff.blah.yech") all(substr(x, 2, 5) == substring(x, 2, 5)) #> TRUE substr(x, 2, 5) substring(x, 2, 4:6)