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) getPkgVers(pkg, libs = reposToolsLibPaths(), 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). 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', 'reposToolsLibPaths' _E_x_a_m_p_l_e_s: lib <- paste(.find.package("reposTools"),"data/",sep="/") getPkgVers("reposTools",lib)