Require {svMisc}R Documentation

A Require Package Function with a GUI (for Windows only)

Description

A Require Package Function with a GUI (for Windows only).

Usage

  Require(package, bundle = NULL, quietly = FALSE, warn.conflicts = TRUE,
      keep.source = getOption("keep.source.pkgs"),
      character.only = FALSE, version, save = TRUE,gui=getOption("guiRequire"))

Arguments

package the name of a package, given as a name or literal character string, or a character string, depending on whether character.only is FALSE (default) or TRUE).
bundle a character string specifying the name of the bundle where the required package can be found. This is useful to specify, otherwise, Require() will look for the package name in the repository, while only the bundle name can be found there!
quietly a logical. If TRUE, no message confirming package loading is printed.
warn.conflicts logical. If TRUE, warnings are printed about code{conflicts} from attaching the new package, unless that package contains an object .conflicts.OK.
keep.source logical. If TRUE, functions “keep their source” including comments, see argument keep.source to options.
character.only a logical indicating whether package or help can be assumed to be character strings.
version A character string denoting a version number of the package to be loaded. If no version is given, a suitable default is chosen.
save logical or environment. If TRUE, a call to require from the source for a package will save the name of the required package in the variable ".required", allowing function detach to warn if a required package is detached. See section ‘Packages that require other packages’ below.
gui logical. If FALSE, this function behaves just like the require function. If TRUE, then if a package fails to load, the user will be prompted with a message box and dialog asking whether they would like to install the package. If the user chooses to install the package, they will be asked which repository or local file they would like to install it from.

Author(s)

James Wettenhall (wettenhall@wehi.edu.au), adaptation by Philippe Grosjean (phgrosjean@sciviews.org)

Examples

  ## Not run: 
  options(guiRequire = TRUE)
  # For packages which are already installed, Require works in the same way as require.
  Require(base)

  # For packages which are not installed, Require asks the user whether they would like to install the package.
  # Require(foo)
  ## End(Not run)

[Package svMisc version 0.9-5 Index]