This function constructs a nested list representing the dependency tree of a specified R package.
The recursion stops at a depth of 3 levels (or until base package).
Usage
build_dependency_tree(package_name, level = 1)
Arguments
- package_name
A character string specifying the name of the package.
- level
An integer indicating the current recursion depth (default: 1).
Value
A nested list representing the dependency tree, where base packages are marked as "base".
Examples
if (FALSE) { # \dontrun{
build_dependency_tree("ggplot2")
} # }