When you execute the body of a function, as you have seen, you do this in the evaluation environment. This evaluation environment is linked through its parent to the environment where the function was defined. It has its arguments stored as promises that will be evaluated either in the environment where the function was defined (for default parameters) or in the environment where the function was called (for parameters provided to the function there). In the previous chapter, you saw how you could get hold of the formal parameters of a function, the body of the function, and the environment in which ...
© Thomas Mailund 2017
Thomas Mailund, Metaprogramming in R, 10.1007/978-1-4842-2881-4_2
2. Inside a Function Call
(1)Aarhus N, Denmark