appDependencies: Detect Application Dependencies

Description Usage Arguments Details Value Examples

Description

Recursively detect all package dependencies for an application. This function parses all R files in the application directory to determine what packages the application depends directly.

Usage

1
2
appDependencies(project = NULL, available.packages = NULL,
  fields = opts$snapshot.fields(), implicit.packrat.dependency = TRUE)

Arguments

project

Directory containing application. Defaults to current working directory.

implicit.packrat.dependency

Include packrat as an implicit dependency of this project, if not otherwise discovered? This should be FALSE only if you can guarantee that packrat will be available via other means when attempting to load this project.

Details

Only direct dependencies are detected (i.e. no recursion is done to find the dependencies of the dependencies).

Dependencies are determined by parsing application source code and looking for calls to library, require, ::, and :::.

Value

Returns a list of the names of the packages on which R code in the application depends.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 

# dependencies for the app in the current working dir
appDependencies()

# dependencies for an app in another directory
appDependencies("~/projects/shiny/app1")


## End(Not run)

packrat documentation built on May 2, 2019, 6:24 a.m.