If a variable with the same name exists in both the local and global environment in R, the ______ variable will be used.

  • Local
  • Global
  • R will throw an error
  • Both local and global variables will be used simultaneously
If a variable with the same name exists in both the local and global environment in R, the local variable will be used. R follows the scoping rules where variables defined in the local environment take precedence over variables with the same name in the global environment.
Add your answer
Loading...

Leave a comment

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