[R-wiki] hyperlink to R doc from wiki R script

Tony Plate tplate at acm.org
Fri Jan 27 18:56:32 CET 2006


Philippe Grosjean wrote:
> Hi,
> I am currently working with the idea of ''rhelp.php'' which allows to 
> link any R function to its man page. Indeed, what we are trying to do 
> here is very close to the builtin DokuWiki 'search' feature: it lists 
> all corresponding man pages... plus a series of pages where the keyword 
> also appears.
> 
> I just changed the link for GeSHi so that it points now to the search 
> page. Look for instance at:
> http://www.sciviews.org/_rgui/wiki/doku.php?id=varia:test_calltip, and 
> at the middle of the page, click on "mean" in:
> 
> x <- rnorm(500)
> mean(x) # I have no calltip for mean()... but the link works (click on 
> 'mean' in the code)!
> 
> At the top of the page, we have "matching pagenames" with all 
> corresponding man page. At the bottom, we have a list of pages where 
> that name appears, sorted by hits... sounds not too bad!
> 
> Now, two problems remain:
> 1) What about man pages that have different names than the function they 
> document? Solution: "Rdconv-to-wiki" could analyze all /alias{...} and 
> create "redirection" pages... relatively easy!

Statically generated translation page(s) sounds like a good idea.

> 
> 2) What about generic functions? Well, we could make a specific section 
> in the documentation called documentation:0__methods__, or so, and fill 
> it with one page per generic function, linking to all methods pages.

The .Rd format has some markup syntax to allow one to specify package 
and method on functions, at least in some contexts. Could the Wiki 
syntax be extended to support this too? The function name should just be 
displayed as usual, but the package and method (if applicable) would be 
available to support linking to the appropriate method in the 
appropriate package.

(The .Rd format allows use of "\method{generic}{class}", at least in the 
synopsis/usage section of a Rd page.)

-- Tony Plate

> 
> That way, we don't need the ''rhelp.php'' piece of code. Your comments?
> Best,
> 
> Philippe Grosjean
> 
> _______________________________________________
> R-sig-wiki mailing list
> R-sig-wiki at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-wiki
>



More information about the R-sig-wiki mailing list