These functions find the packages/functions to use when running
add_double_colons().
Usage
is_dev_context(dir = ".")
imported_functions(dir = ".")
current_packages(
dir = ".",
base_packages = getOption("defaultPackages"),
include_types = "Imports"
)Value
TRUE if the current context is package development, FALSE otherwise.
A character vector of imported function names, or NULL if no
NAMESPACE file is found or {pkgload} is not installed.
A character vector of package names.
Details
current_packages()first checks if the current context is package development. If it is, then it returns the packages which are listed in the packageDESCRIPTIONas dependencies, but will not return any packages also listed as imports in the packageNAMESPACE. If the current context is not package development, the currently attached packages (as given bysearch()) are used. Note that if{pkgload}is not installed then the latter option is always used.imported_functions()looks for a packageNAMESPACEfile and returns the names of all imported functions. If aNAMESPACEfile is not found, or if{pkgload}is not loaded,NULLis returned.
