R/get_package_function_usage.R
get_function_call_frequency.Rd
Which Function is Called How Often?
get_function_call_frequency(tree, simple = FALSE, dbg = TRUE)
parse tree as returned by parse_scripts
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.
if TRUE
, debug messages are shown
data frame with columns name
(name of function), count
(number of times the function is called)