get_function_call_frequency: Which Function is Called How Often?

View source: R/get_package_function_usage.R

get_function_call_frequencyR Documentation

Which Function is Called How Often?

Description

Which Function is Called How Often?

Usage

get_function_call_frequency(tree, simple = FALSE, dbg = TRUE)

Arguments

tree

parse tree as returned by parse_scripts

simple

if TRUE, a simple approach using a simple regular expression is used. This approach is fast but not correct as it e.g. counts function calls that are commented out or even string expressions that just look like function calls. Leaving this argument to its default, FALSE, will return only real function calls by evaluating the full structure of parse tree.

dbg

if TRUE, debug messages are shown

Value

data frame with columns name (name of function), count (number of times the function is called)


KWB-R/kwb.code documentation built on July 28, 2023, 5:57 p.m.