checkShinyDependencyUse: Check Shiny Application Dependencies

Description Usage Arguments Value See Also Examples

View source: R/shiny_check.R

Description

'checkShinyDependencyUse()' checks the global.R and app.R (or ui.R and server.R) scripts within a project, and any specified directory within the project, for package calling through the use of library, require and requireNamespace. It also finds packages explicitly used via the pkg::function notation.

Using these packages, it then checks the same R scripts to check for function use of each package.

Usage

1
checkShinyDependencyUse(path = ".", r_scripts_dir = "R", verbose = TRUE)

Arguments

path

Path to the application root directory

r_scripts_dir

Subdirectories in the shiny application that contain R scripts, write as relative paths to path. Default is set to R

verbose

Logical, should informative messages be printed during the dependency evaluation?

Value

An object of class multi_package_usage, a named list of the dependencies used, each containing a data.frame of all the functions within the package and how often they are used within the project.

The result will flag any packages that have been rarely used in the project.

See Also

checkProjectDependencyUse, checkPackageDependencyUse

Examples

1
2
3
4
5
## Not run: 
dependency_use <- checkShinyDependencyUse()
summary(dependency_use)

## End(Not run)

ashbaldry/depcheck documentation built on Jan. 1, 2022, 11:11 p.m.