getPackageName
Package name

Description

Get or set the name of an attached package or environment

Usage

getPackageName(where = topenv(parent.frame()), create = TRUE)
setPackageName(pkg, env)

Arguments

where an environment or the position or name of an item on the search list that can be mapped to an environment by as.environment.
create A logical value. If TRUE (the default) and if no package name is found, a new name is created and set to be the name of the environment.
pkg A character string. The new name for a package.
env An environment. The environment whose name is to be set.

Details

If the environment contains an object called .packageName then it is considered the name of the package. Otherwise, its name is taken from its name on the search list.
Value
getPackageNamereturns the name of the package.
setPackageNamereturns the name of the package.
Examples
getPackageName(2)
Package methods version 6.1.1-7
Package Index