pkgSrc: Determine source of installed packages

Description Usage Arguments Examples

Description

Which packages were installed from CRAN, GitHub, Bioconductor, etc.?

Usage

1
pkgSrc(pkg, lib.loc = NULL)

Arguments

pkg

a character string with the package name.

lib.loc

a character vector of directory names of R libraries, or NULL. The default value of NULL corresponds to all libraries currently known. If the default is used, the loaded packages and namespaces are searched before the libraries.

Examples

1
2
3
4
5
pkgs <- as.data.frame(installed.packages(), stringsAsFactors = FALSE)
ids <- which(!(pkgs$Priority %in% c("base", "recommended")))
pkgs <- pkgs[ids, ]
pkgs <- pkgs$Package
pkgs[pkgSrc(pkgs) == "CRAN"]

achubaty/amc documentation built on April 6, 2021, 6:56 a.m.