
Last chance! 50% off unlimited learning
Sale ends in
installed.packages(lib.loc = NULL, priority = NULL, noCache = FALSE, fields = NULL, subarch = .Platform$r_arch)
NULL
for all known trees
(see .libPaths
).
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"
.
DESCRIPTION
file in addition to the default
ones, or NULL
(default). Unavailable fields result in
NA
values.NULL
. If non-null and
non-empty, used to select packages which are installed for that
sub-architecture.
"Package"
, "LibPath"
,
"Version"
, "Priority"
,
"Depends"
, "Imports"
, "LinkingTo"
,
"Suggests"
, "Enhances"
,
"OS_type"
, "License"
and
"Built"
(the R version the package was built under).
Additional columns can be specified using the fields
argument.
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. The information found is cached (by library) for the R session and
specified fields
argument, 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)
.
update.packages
,
install.packages
,
INSTALL
, REMOVE
.
## confine search to .Library for speed
str(ip <- installed.packages(.Library, priority = "high"))
ip[, c(1,3:5)]
plic <- installed.packages(.Library, priority = "high", fields = "License")
## what licenses are there:
table( plic[, "License"] )
Run the code above in your browser using DataLab