Learn R Programming

SciViews (version 0.8-8)

Require: 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 t
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
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 wh

Examples

Run this code
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)

Run the code above in your browser using DataLab