build_dependency_map: Brief: Build Recursive Dependency Map of User-Defined...

View source: R/build_dependency_map.R

build_dependency_mapR Documentation

Brief: Build Recursive Dependency Map of User-Defined Functions

Description

Description: This function recursively builds a list of data frames, each representing a user-defined function and its dependencies. Starting from the main function (typically the main script wrapped as a function), it uses find_dependencies() from the functiondepends package to trace all user-defined function calls. The process continues until no new dependencies are found.

Usage

build_dependency_map(
  func_name,
  visited = character(),
  all_deps = list(),
  env = parent.frame()
)

Arguments

func_name

The name of the main function (converted from the main script) to begin tracing dependencies from.

visited

A character vector used to track already visited functions and prevent infinite recursion.

all_deps

A list used to accumulate the dependency data frames for each user-defined function.

env

The local enviroment created in funcMapper()

Details

Author: Antonio Fratamico Date: 10/07/2025

Value

A named list of data frames, where each data frame contains the dependencies of a user-defined function.


funcMapper documentation built on Aug. 8, 2025, 7:29 p.m.