[R] searching R-help within a function

Olivia Lau olau at fas.harvard.edu
Tue Sep 23 02:51:18 CEST 2003


Hi,

I am working on a package which requires separate documentation
(tutorial documentation, really, with a lot of beautifully
latexed equations), and does not use R-help.  I am trying to
make it so that my help function will automatically search
R-help if the help topic isn't found in my documentation.

The function looks something like this:

help.pkg <- function(topic) {            # where the topic is a
character string
    url <- NULL
    if(is.character(topic)) {
        .....   # assignments for the URL given the topic
       }
    if (is.null(url)) {
        topic <- as.name(topic)
        help(topic)
   }
}

In the last line, help(topic) returns that there is no help for
"topic".  I have also tried various permutations of
substitute(help(topic)) and eval() to no avail.

Any suggestions are greatly appreciated.  Thanks,

Olivia Lau.




More information about the R-help mailing list