Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

make.usage.section

Construct sections of documentation


Description

Don't bother reading about these unless you are sure you need to! These are really intended for expediting documentation of large numbers of "internal" functions in a proto-package, and are called by make.internal.doc. make.usage.section and make.arguments.section form prototype USAGE and ARGUMENTS section for the specified functions. These are ready for pasting into flat-format documentation (and subsequent editing).

Usage

make.usage.section( funs=, file=stdout(), env=.GlobalEnv)
make.arguments.section( funs=, file=stdout(), env=.GlobalEnv)

Arguments

funs

character vector of function names, defaulting to find.funs() %except% find.documented( doctype="Rd")

file

where to put the output ("clipboard" is useful). NULL means don't print.

env

where to look for the functions

Details

The default funs argument will find all functions not mentioned in flat-format ready-for-doc2Rd documentation. This is useful for documenting a group of "internal" functions.

make.usage.section simply puts the name of each function before its deparsed and concatenated argument list, one function per line.

make.arguments.section puts one argument per line, then a colon, then the name of the function in parentheses. The idea is that something about the argument should be added manually in a text editor.

Value

Character vector containing the doc section (in plain text, not Rd format).

Author(s)

Mark Bravington

See Also

Examples

make.usage.section( c( "make.usage.section", "find.funs"), env=asNamespace( 'mvbutils'))
make.arguments.section( c( "make.usage.section", "find.funs"), env=asNamespace( 'mvbutils'))

mvbutils

Workspace Organization, Code and Documentation Editing, Package Prep and Editing, Etc

v2.8.232
GPL (>= 2)
Authors
Mark V. Bravington <mark.bravington@csiro.au>
Initial release
2018-12-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.