Learn R Programming

reproducible (version 0.2.0)

pkgDep: Determine package dependencies, first looking at local filesystem

Description

This is intended to replace package_dependencies or pkgDep in the miniCRAN package, but with modifications for speed. It will first check local package directories in libPath, and it if the function cannot find the packages there, then it will use package_dependencies.

Usage

pkgDep(packages, libPath, recursive = TRUE, depends = TRUE,
  imports = TRUE, suggests = FALSE, linkingTo = TRUE,
  repos = getOption("repos"))

Arguments

packages

a character vector of package names.

libPath

The library path where all packages should be installed, and looked for to load (i.e., call library)

recursive

Logical. Should dependencies of dependencies be searched, recursively. NOTE Dependencies of suggests will not be recursive. Default TRUE.

depends

Logical. Include packages listed in "Depends". Default TRUE.

imports

Logical. Include packages listed in "Imports". Default TRUE.

suggests

Logical. Include packages listed in "Suggests". Default FALSE.

linkingTo

Logical. Include packages listed in "LinkingTo". Default TRUE.

repos

The remote repository (e.g., a CRAN mirror), passed to either install.packages, install_github or installVersions.

Examples

Run this code
# NOT RUN {
pkgDep("crayon")
# }

Run the code above in your browser using DataLab