installed.packages           package:utils           R Documentation

_F_i_n_d _I_n_s_t_a_l_l_e_d _P_a_c_k_a_g_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Find (or retrieve) details of all packages installed in the
     specified libraries.

_U_s_a_g_e:

     installed.packages(lib.loc = NULL, priority = NULL, noCache = FALSE)

_A_r_g_u_m_e_n_t_s:

 lib.loc: character vector describing the location of R library trees
          to search through. 

priority: character vector or 'NULL' (default).  If non-null, used to
          select packages; '"high"' is equivalent to 'c("base",
          "recommended")'.  To select all packages without an assigned
          priority use 'priority = "NA"'. 

 noCache: Do not use cached information.

_D_e_t_a_i_l_s:

     'installed.packages' scans the 'DESCRIPTION' files of each package
     found along 'lib.loc' and returns a matrix of package names,
     library paths and version numbers.

     *Note:* this works with package names, not bundle names.

     The information found is cached (by library) for the R session,
     and updated only if the top-level library directory has been
     altered, for example by installing or removing a package.  If the
     cached information becomes confused, it can be refreshed by
     running 'installed.packages(noCache = TRUE)'.

_V_a_l_u_e:

     A matrix with one row per package, row names the package names and
     column names '"Package"', '"LibPath"', '"Version"', '"Priority"',
     '"Bundle"', '"Contains"', '"Depends"', '"Suggests"', '"Imports"'
     and '"Built"' (the R version the package was built under).

_S_e_e _A_l_s_o:

     'update.packages', 'INSTALL', 'REMOVE'.

_E_x_a_m_p_l_e_s:

     str(ip <- installed.packages(priority = "high"))
     ip[, c(1,3:5)]

