setPackageExtraHandler {pkgmaker}R Documentation

Install/Run Extra Things After Standard Package Installation

Description

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.

Usage

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")
)

Arguments

handler

name of a handler, e.g, 'install'. It must be unique across all handlers registered by any other packages.

fun

handler function that will be called with the arguments registered with packageExtra(name, ...)

...

extra arguments passed to internal function calls. In packageExtraHandler, these are passed to pkgreg_fetch.

In setPackageExtra, these define default arguments for the handler function. These are overwritten by arguments in the call to runner function if any.

extra

name of the extra action.

package

package name where to store/look for the internal registries. End users should not need to use this argument.

.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.

Value

the runner function associated with the newly registered handler, as built by packageExtraRunner.

Functions


[Package pkgmaker version 0.32.10 Index]