auto_imports: [DEV] Scans a function and determines what functions it uses...

Description Usage Arguments Details

Description

This function is aimed primarily at developers extending this package. You shouldn't need to use it for everyday operation.

Scans a function and determines what functions it uses from other packages.

Usage

1
  auto_imports(f, imported = NULL, imports = NULL)

Arguments

f

function to process

name

name of function. If omitted, defaults to the deparsed call to f - this is only useful for interactive use.

imported

list of functions that are already imported

imports

list of imported packages. If omitted, auto_imports will attempted to determine automatically by inspecting the the ‘DESCRIPTION’ of the package that f belongs to.

Details

If a function is available in two or more packages, then it is flagged as a conflict, and it must be resolved by hand using @importFrom. The only exception is if a function of that name exists in the same environment as f: in that case, no import statement will be generated.

All packages (including recommend packages like stats and graphics) need explicit imports in the ‘NAMESPACE’ file. The only exception is the base package.


hadley/roxygen3 documentation built on May 17, 2019, 12:16 p.m.