In R, a function nested inside another function has access to the variables in the ________ of the outer function.

  • environment
  • global environment
  • parent environment
  • child environment
In R, a function nested inside another function has access to the variables in the parent environment of the outer function. This allows the nested function to access and manipulate variables defined in the outer function, even after the outer function has finished executing. The scoping rules in R facilitate this access to variables from higher-level environments.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *