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"
Value
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).
Warning
This is highly specific to my way of working, don't rely blindly on it.
If a file already exists, it is not overwritten, instead a new file fun_2.Rd
or fun_3.Rd
(up to 99), is created.
Empty (or space-only) lines are silently ignored. 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.Details
This assumes the following structure of source code:
MyFun <- function(
arg1, # Explanation of this item
arg2=TRUE, # Ditto, with default
arg3)
'{'
computations'}'
The opening bracket line may ONLY contain the curly brace