Learn R Programming

ascribe (version 0.2.0)

build_origin_map: Build an origin map for package functions

Description

Given a named list mapping package names to character vectors of function names, creates a named character vector mapping "pkg::fun" keys to the origin package. Functions whose origin cannot be determined fall back to the providing package.

Usage

build_origin_map(exports)

Value

Environment mapping "pkg::fun" keys to origin package names.

Arguments

exports

Named list. Names are package names, values are character vectors of function names.

Examples

Run this code
exports <- list(
  stats = collect_pkg_funs("stats"),
  utils = collect_pkg_funs("utils")
)
build_origin_map(exports)

Run the code above in your browser using DataLab