ehelp | R Documentation |
Enhanced-Help Function: ehelp() This function displays docstring style comments used as help liners for user defined functions.
ehelp( fun, fn.name = as.character(substitute(fun)), coloring = FALSE, output = "none" )
fun |
function name of an user-defined function |
coloring |
a Boolean flag indicating whether to use colors for displaying messages |
output |
specify if the documentation generated by the ehelp() will be saved in a file, possible values are "txt" (for help only), "TXT" (for help and full fn body) or "none" (default, for in screen display only) |
fn |
name of the function (string) |
myTestFn <- function(x,y,z,t=0) { #' #' This is just an example of a dummy fn #' #' #' @email myemail@somewhere.org #' @author author # # #' @demo #' @examples myTestFn(x0,y0,z0) } ehelp(myTestFn) ## this requires the "crayon" package to work ehelp(myTestFn, coloring=TRUE) ## generation of documentation for a fn in different formats ## by indicating a particular format, ehelp will save in a file ## the corresponding documentation of the selected fn ## Valid formats are: ## txt (plain-text), ascii (text with ESC-codes for coloring), ## latex, html, markdown ## Additionally, capitalized versions of these formats, will also include ## the listing of the fn ## Not run: ehelp(myTestFn, output="latex") ehelp(myTestFn, output="TXT") ehelp(myTestFn, coloring=TRUE, output="HTML") ehelp(myTestFn, coloring=TRUE, output="ASCII") ehelp(myTestFn, coloring=TRUE, output="markdown") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.