I would like to check if the current environment is the global environment in R. However, direct comparison doesn't seem to work with evironments. What is the best way to do this?
#doesn't work
sys.frame() == .GlobalEnv
I would like to check if the current environment is the global environment in R. However, direct comparison doesn't seem to work with evironments. What is the best way to do this?
#doesn't work
sys.frame() == .GlobalEnv