# List the names of scoped environments:
nms <- env_scoped_names()
nms
# The global environment is always the first in the chain:
env_scoped(nms[[1]])
# And the scoped environment of the base package is always the last:
env_scoped(nms[[length(nms)]])
# These two environments have their own shortcuts:
env_global()
env_base()
# Get the scoped environment of a package:
env_package("utils")
Run the code above in your browser using DataLab