checkFunctionUse: Check Function Usage in Code

Description Usage Arguments Details

View source: R/check_function_use.R

Description

Counting the frequency that a function is called within selected code.

Usage

1
checkFunctionUse(function_name, code, package_name = NULL)

Arguments

function_name

Name of the function to check against

code

A character vector of code chunks to check for function use

package_name

Name of the package that function_name is contained in

Details

If package_name is left as NULL, then there is a chance the checks will find times where the function is used, but is explicitly called from another package.

There are three stages of checking: - If the function name exists anywhere in the code chunks - If it has not been previously assigned in a code chunk - If the function name is not quoted

At each stage, only keep chunks where the function has been called to improve speed


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