pkgSrc: Determine source of installed packages

pkgSrcR Documentation

Determine source of installed packages

Description

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

Usage

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

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 June 10, 2025, 1:10 p.m.