checkProjectDependencyUse: Check Project Package Dependencies

Description Usage Arguments Value See Also Examples

View source: R/project_check.R

Description

'checkProjectDependencyUse()' checks R scripts within a 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
checkProjectDependencyUse(path = ".", recursive = TRUE, verbose = TRUE)

Arguments

path

Path to the directories to search for R scripts. By default looks in the current working directory.

recursive

Logical. Should the R file search recurse into directories?

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

checkPackageDependencyUse, checkShinyDependencyUse

Examples

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

## End(Not run)

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