Learn R Programming

rsconnect (version 0.8.28)

appDependencies: Detect Application Dependencies

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 on; and for each of those packages what other packages they depend on.

Usage

appDependencies(appDir = getwd(), appFiles = NULL)

Value

Returns a data frame listing the package dependencies detected for the application:

packageName of package
versionVersion of package

Arguments

appDir

Directory containing application. Defaults to current working directory.

appFiles

The files and directories to bundle and deploy (only if upload = TRUE). Can be NULL, in which case all the files in the directory containing the application are bundled, with the exception of any listed in an .rscignore file. Takes precedence over appFileManifest if both are supplied.

Details

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

Recursive dependencies are detected by examining the Depends, Imports, and LinkingTo fields of the packages immediately dependend on by the application.

See Also

rsconnectPackages(Using Packages with rsconnect)

Examples

Run this code
if (FALSE) {

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

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

Run the code above in your browser using DataLab