Description Usage Arguments Value
View source: R/package-extra.R
These functions define a framework to register actions for which default sets of arguments can be defined when (lazy-)loading a package, and run later on, e.g., after the package is installed using dedicated commands.
setPackageExtraHandler defines main action handler
functions, for which actions are defined as a set of
arguments and registered using setPackageExtra.
packageExtraHandler retrieves a given handler from
the registry.
For example, calling setPackageExtra('install',
pkgs='non_CRAN_pkg', repos='http://non-standard-repo')
in a source file of package 'myPkg' registers the call
install.packages('non_CRAN_pkg',
repos='http://non-standard-repo', ...) in a registry
internal to the package. All calls to
setPackageExtra('install', ...) can then be run by
the user, as a post installation step via
install.extrapackages('myPkg', ..).
packageExtra retrieve a given extra action, either
as its registry entry, or as a function that would
perform the given action.
packageExtraRunner defines a function to run all
or some of the actions registered for a given handler in
a given package. For example, the function
install.extrapackages is the runner defined for
the extra handler 'install' via
packageExtraRunner('install').
install.extrapackages runs all extra actions
registered for a given package.
install.extrapackages is defined as the extra
handler for the extra action handler
'install.packages'. All arguments in ...
are passed to install.packages. By default,
packages that are already installed are not re-installed.
An extra argument force allows to force their
installation. The packages are loaded if their
installation is successful.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | setPackageExtraHandler(handler, fun, ...)
packageExtraHandler(handler = NULL, ...)
setPackageExtra(handler, extra, ...)
packageExtra(handler = NULL, extra = NULL,
package = NULL, .wrap = FALSE)
packageExtraRunner(handler)
install.extras(package, extra = NULL, handler = NULL,
..., .verbose = getOption("verbose"))
install.extrapackages(package, extra = NULL,
handler = NULL, ..., .verbose = getOption("verbose"))
|
handler |
name of a handler, e.g, |
fun |
handler function that will be called with the arguments registered
with |
package |
package name where to store/look for the internal registries. End users should not need to use this argument. |
... |
extra arguments passed to internal function calls.
In In |
extra |
name of the extra action. |
.wrap |
logical that indicates if a function that runs the extra action should be returned or only the default arguments |
.verbose |
logical that indicates if verbose messages about the extra actions being run should be displayed. |
the runner function associated with the newly registered handler,
as built by packageExtraRunner.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.