Skip to content
Prev 316741 / 398506 Next

Question: write an R script with help information available to the user

On Sun, Feb 3, 2013 at 1:50 AM, Bert Gunter <gunter.berton at gene.com> wrote:
To further build on this try the above idea using the comment function:
[1] "Help goes here"

or combine it with the redefinition of ? like like this:

`?` <- function(...) if (!is.null(doc <-
comment(get(match.call()[[2]])))) cat(doc, "\n") else help(...)
?f    #  displays:  Help goes here
?dim   # normal help

--
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com