getPkgVers            package:reposTools            R Documentation

_I_n_f_o_r_m_a_t_i_o_n _f_o_r _a_n _i_n_s_t_a_l_l_e_d _p_a_c_k_a_g_e

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

     These functions retrieve information on installed packages,
     including whether or not a package is installed.

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

     is.installed(pkg, vers=NULL, verbose=TRUE, oper="==", libs=.libPaths())
     getPkgVers(pkg, libs = .libPaths(), verbose=TRUE)

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

     pkg: The package to check

    vers: The version of the package.  NULL implies any version

    libs: A R library directory (or vector of directories).  Default is
          .libPaths()

 verbose: Extra diagnostics

    oper: Allows for a version test instead of a direct '=='

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

     is.installed: This function will return a logical representing if
     the specified package is installed or not.  The version parameter
     defaults to NULL, which implies any version of the package.  If a
     version is specified, it can be either as a string or as a
     'VersionNumber' object.  If the former, it will be coerced to the
     latter.  Argument 'oper' can be any comparitive function (>, <,
     !=, etc), but defaults to '=='.  This is the comparator applied to
     see if a package of a given version is installed.

     getPkgVers:  This function returns a list containing all version
     numbers of any instance of the package being isntalled.  If the
     package is installed only in one occassion, it will be a single
     element list.  If the package is installed multiple times, each
     instance will have a corresponding version number.  Likewise, an
     empty list is returned if the package is not installed.  The
     'VersionNumber' class is used for the return value.

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

     Jeff Gentry

_S_e_e _A_l_s_o:

     'VersionNumber'

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

       lib <- paste(.find.package("reposTools"),"data/",sep="/")
       getPkgVers("reposTools",lib)

