Gets the name of an environment

Description

Gets the name of an environment, e.g. "R_GlobalEnv" or "0x01ddd060".

Usage

1
2
## S3 method for class 'environment'
getName(env, ...)

Arguments

env

An environment.

...

Not used.

Value

Returns a character string.

Author(s)

Henrik Bengtsson

See Also

environmentName().

Examples

1
2
3
4
5
  name <- getName(globalenv())
  print(name)
  stopifnot(identical(name, "R_GlobalEnv"))

  getName(new.env())

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.