Rfile.index: Create an index file for an R function file

View source: R/NCmisc.R

Rfile.indexR Documentation

Create an index file for an R function file

Description

Create a html index for an R function file by looking for functions, add descriptions using comments directly next to the function() command. Note that if too much code other than well-formatted functions is in the file then the result is likely not to be a nicely formatted index.

Usage

Rfile.index(fn, below = TRUE, fn.out = "out.htm", skip.indent = TRUE)

Arguments

fn

an R file containing functions in standard R script

below

whether to search for comment text below or above the function() calls

fn.out

optional name for the output file, else will be based on the name of the input file

skip.indent

whether to skip functions that are indented, the assumption being they are functions within functions

Value

creates an html file with name and description of each function

Author(s)

Nicholas Cooper njcooper@gmx.co.uk

See Also

list.functions.in.file

Examples

# not run:  rfile <- file.choose() # choose an R script file with functions
# not run:  out <- Rfile.index(rfile,fn.out="temp.htm")
# unlink("temp.htm") # run once you've inspected this file in a browser

NCmisc documentation built on Oct. 17, 2022, 5:09 p.m.