packageEnv {pkgmaker}R Documentation

Package Development Utilities

Description

packageEnv is a slight modification from topenv, which returns the top environment, which in the case of development packages is the environment into which the source files are loaded by load_all.

Usage

packageEnv(pkg, skip = FALSE, verbose = FALSE)

topns_name(n = 1L, strict = TRUE, unique = TRUE)

topns(strict = TRUE)

packageName(envir = packageEnv(), .Global = FALSE, rm.prefix = TRUE)

str_ns(envir = packageEnv())

packagePath(..., package = NULL, lib.loc = NULL, check = TRUE)

isPackageInstalled(..., lib.loc = NULL)

as_package(x, ..., quiet = FALSE, extract = FALSE)

Arguments

pkg

package name. If missing the environment of the runtime caller package is returned.

skip

a logical that indicates if the calling namespace should be skipped.

verbose

logical that toggles verbosity

n

number of namespaces to return

strict

a logicical that indicates if the global environment should be considered as a valid namespace.

unique

logical that indicates if the result should be reduced to contain only one occurence of each namespace.

envir

environment where to start looking for a package name. The default is to use the runtime calling package environment.

.Global

a logical that indicates if calls from the global environment should throw an error (FALSE: default) or the string 'R_GlobalEnv'.

rm.prefix

logical that indicates if an eventual prefix 'package:' should be removed from the returned string.

...

arguments passed to file.path.

package

optional name of an installed package

lib.loc

path to a library of R packages where to search the package

check

logical that indicates if an error should be thrown if the path to the package root directory cannot be found. If this is the case and check = FALSE, then the function returns NULL.

x

package specified by its installation/development path or its name as 'package:*'.

quiet

a logical that indicate if an error should be thrown if a package is not found. It is also passed to find.package.

extract

logical that indicates if DESCRIPTION of package source files should be extracted. In this case there will be no valid path.

Value

Functions


[Package pkgmaker version 0.32.10 Index]