View source: R/get_package_function_usage.R
get_package_function_usage | R Documentation |
How Often Are the Functions of a Package Used?
get_package_function_usage(tree, package, simple = FALSE, by_script = FALSE)
tree |
parse tree as returned by |
package |
name of the package (must be installed) |
simple |
if |
by_script |
if |
data frame with columns name
(name of the function),
prefixed
(number of function calls prefixed with <package>::
or <package>:::
), non_prefixed
(number of function calls
that are not prefixed with the package name) and total
(total
number of function calls)
# Read all scripts that are provided in the kwb.fakin package
tree <- kwb.code::parse_scripts(root = system.file(package = "kwb.fakin"))
# Check which functions from kwb.utils are used and how often
get_package_function_usage(tree, package = "kwb.utils")
# Hm, this does not seem to be the whole truth...
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.