listFunctions: Build a list comprising all functions found in R files

Description Usage Arguments Details Value Examples

View source: R/utils.R

Description

Build a list comprising all functions found in R files

Usage

1
listFunctions(pattern = "_functions\\.R$")

Arguments

pattern

A character vector of length one. The pattern used in the search for R files.

Details

The returned list comprises of an element for each function found in (most) R files. Each list element is also a list. Currently it just searches in files named "*_functions.R". As the code must "source()" the R file, scripts are not evaluated—just files known to include only function definitions.

Value

A list of all functions

Examples

1
2
3
4
5
6
7
8
## Not run: 
listFunctions()
res <- listFunctions()
fn.names <- lapply(res, function(x){	data.frame(x$filepath, x$function.name)})
fn.names <- do.call("rbind", fn.names)
View(fn.names[order(fn.names$x.function.name),])

## End(Not run)

MichaelFolkes/utilizer documentation built on May 27, 2019, 3:29 p.m.