Learn R Programming

berryFunctions (version 1.4)

compareDoc: compare Documentation file with source file

Description

Compare arguments in Documentation file (.Rd) with those in the source file (.r). Saves time when building package.

Usage

compareDoc(fun, path = "S:/Dropbox/Public/BerryFunctions")

Arguments

fun
Character string. Function (== filename) with correct structure 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) None. Cats into the console if there are inconsistancies. [object Object],[object Object],[object Object]
Warning
{This is highly specific to my way of working, don't rely blindly on it.} seealso{code{createDoc}, code{scan}, code{cat}} examples{ dontrun{ FNS <- sapply( strsplit( dir("../berryFunctions/R/"), ".", fixed=TRUE ) , "[", 1) for(i in FNS) compareDoc(i) } } keyword{documentation}