Require                package:svMisc                R Documentation

_A _R_e_q_u_i_r_e _P_a_c_k_a_g_e _F_u_n_c_t_i_o_n _w_i_t_h _a _G_U_I (_f_o_r _W_i_n_d_o_w_s _o_n_l_y)

_D_e_s_c_r_i_p_t_i_o_n:

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

_U_s_a_g_e:

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

_A_r_g_u_m_e_n_t_s:

 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.

_A_u_t_h_o_r(_s):

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

_E_x_a_m_p_l_e_s:

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

