Learn R Programming

berryFunctions (version 1.7.1)

createDoc: Create Documentation file from .r-source

Description

Create Documentation file (especially section arguments) from .r-source

Usage

createDoc(fun, path = "S:/Dropbox/Public/berryFunctions")

Arguments

fun
Character string or unquoted name. Function (== filename) with structure described in 'Details' in source code.
path
Path to package in development containing folders 'R' and 'man'. DEFAULT: "S:/Dropbox/Public/berryFunctions"

Details

This assumes the following structure of source code: MyFun <- function( arg1, # Explanation of this item}\cr arg2=TRUE, # Ditto, with default}\cr arg3) { do this and that. The above line may ONLY contain the curly brace None. Cats documentation for fun in path/man. Only usage, arguments and author section are filled, the rest is empty (but the frame is there). [object Object],[object Object],[object Object]
Warning
{This is highly specific to my way of working, don't rely blindly on it.cr If a file already exists, it is not overwritten, instead a new file code{fun_2.Rd} or code{fun_3.Rd} (up to 99), is created.cr Empty (or space-only) lines are silently ignored.cr A line with two arguments will throw a warning, as they can't be listed in the argument section. They should be written normally into the usage section. } package.skeleton, prompt, scan, cat, Roxygen and Roxygen2 http://cran.r-project.org/web/packages/roxygen2/vignettes/rd.html #createDoc("textField") documentation