checkImports: Check imports in source code

View source: R/checkImports.R

checkImportsR Documentation

Check imports in source code

Description

For each file in package/R, check whether all used functions are imported. There may be false positives: function names in comments or within character strings are included as well. (Comment-only lines are ignored).

Usage

checkImports(path = ".", filename = "checkImports.R")

Arguments

path

Package path, Character string. DEFAULT: "." (current getwd)

filename

Output file name. Text will be added, previous content remains. DEFAULT: "checkImports.R"

Author(s)

Berry Boessenkool, berry-b@gmx.de, Aug 2017

Examples

## Not run:  # exclude from checks
library(berryFunctions)
setwd(paste0(pathFinder(), "/berryFunctions"))
imps <- checkImports()
openFile("checkImports.R")
for(n in names(imps)[!sapply(imps, is.null)]) openFile(n) ; rm(n)
unlink("checkImports.R")

## End(Not run)


brry/installB documentation built on Jan. 3, 2024, 6:49 p.m.