Skip to contents

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)