toc: Generate Table-of-Contents for a Collection of R code, either...

tocR Documentation

Generate Table-of-Contents for a Collection of R code, either via Static or Dynamic Analysis.

Description

toc statically reads all the function definitions and returns a data.frame with the names of the functions and the file each is in.

Usage

toc(dir = ".", files = getRFiles(dir, pattern = pattern), pattern = "\\.[RrsSq]$")    

Arguments

dir

the directory in which to find the R files.

files

a character vector of the paths to the R files.

pattern

the pattern for finding the R files that is passed to list.files.

Value

A data.frame.

Author(s)

Duncan Temple Lang

See Also

getFunctionDefs

Examples

d = system.file("sampleCode", package = "CodeAnalysis")
df = toc(d)
head(df)

duncantl/CodeAnalysis documentation built on June 12, 2025, 6:44 a.m.