loadDepends            package:reposTools            R Documentation

_A _f_u_n_c_t_i_o_n _t_o _l_o_a_d _p_a_c_k_a_g_e/_v_i_g_n_e_t_t_e _d_e_p_e_n_d_e_n_c_i_e_s

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

     Given a package or a vignette, will determine any dependencies and
     load the required packages - as well as alerting the user to any
     unresolved dependencies.

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

     loadDepends(x, force = FALSE, recursive = TRUE, local = TRUE)

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

       x: The object to check

   force: If TRUE, will continue even if not all dependencies are
          installed

recursive: Whether or not to look at indirect dependencies

   local: Whether or not to only search locally or to use the internet
          to find unresolved dependencies

_D_e_t_a_i_l_s:

     This function will first determine if the object is an installed
     package or a vignette.  In either case, it will extract a listing
     of all dependencies (both the names and any versioning
     requirements). If not all of the dependencies are met, the
     function will halt with an error and report which packages were
     not met - unless the 'force' option is set to 'TRUE'.  Otherwise,
     all of the installed dependencies will be loaded.

_V_a_l_u_e:

     A character vector listing the loaded packages.  If there were no
     installed dependencies to load, an empty vector is returned.

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

     Jeff Gentry

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

     ## Using 'local==TRUE' in case the user doesn't have an internet
     ## connection available. 
        loadDepends("reposTools", local=TRUE)

