standardize_env_name: Standardize the name of a named environment

Description Usage Arguments Value

View source: R/functions.r

Description

This function standardizes the name of a named environment so it is consistent with the output of the base function environmentName. For instance globalenv(), .GlobalEnv becomes "R_GlobalEnv" emptyenv() becomes "R_EmptyEnv" baseenv() or as.environment("package:base") becomes "base". All other named environments such as packages and namespaces are also converted to the standard name used by R.

Usage

1

Arguments

env_name

environment name to standardize.

Value

Standardized name of the environment. If the environment is NOT a named environment and it does not contain an expression that resolves to a named environment it returns the input name as is. This includes strings that represent non-existing objects.


envnames documentation built on Dec. 8, 2020, 9:07 a.m.