extract_api: Get package data

Description Usage Arguments Details Value

View source: R/prepare.R

Description

Parse and evaluate code from a package, and store it in an environment, so that we can access it later without parsing it again.

Usage

1
extract_api(path = ".", targets = character())

Arguments

path

package root

targets

character vector, function call targets to find

Details

We need to evaluate code to get the functions, which might require loading some packages, so we perform all this in a separate R process, using the callr package.

While we are at it, we also check the imports of the package, and return where each function was imported from.

Value

Named list with components:


r-lib/pkgapi documentation built on March 7, 2020, 10:55 a.m.