NCmisc (version 1.1.6)

Rfile.index: 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)

Value

creates an html file with name and description of each function

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

Author

Nicholas Cooper njcooper@gmx.co.uk

See Also

list.functions.in.file

Examples

Run this code
# 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

Run the code above in your browser using DataCamp Workspace