[Rd] R v2.10.0: Doc clarification for cross references and where are we heading?

Romain Francois romain.francois at dbmail.com
Thu Sep 24 11:42:40 CEST 2009


On 09/24/2009 11:28 AM, Duncan Murdoch wrote:
>
> On 23/09/2009 11:21 PM, Gabor Grothendieck wrote:
>> On Wed, Sep 23, 2009 at 10:54 PM, Duncan Murdoch
>> <murdoch at stats.uwo.ca> wrote:
>>> - Ways to link from man pages to vignettes. The reverse would be
>>> nice, but
>>> it's not possible with the current design, so that would be far off.
>>>
>>
>> If feasible I would like to be able to link to any text, html or pdf
>> file in the package. For example, it would be nice to be able to link
>> to the NEWS file and pdf files that are included in the package even
>> if they are not vignettes, etc.
>
> The \Sexpr mechanism probably allows this, though there are currently no
> built-in support functions to help you get there. As I mentioned, that
> could all be done by code in a contributed package.
>
> One way would be to have one help page which contains only
>
> \Sexpr[stage=render, results=rd]{generatePage()}
>
> and it will be 100% generated at render time, containing whatever you
> want it to contain. (Presumably you'll have some way to communicate what
> you want through variables that generatePage() can see.) Each time you
> link to it you'll see something different.
>
> Duncan Murdoch

Brilliant. Thanks. That solves my question as well.

I did not see results = documented in ?Rd2HTML, what is allowed ?
Is \Sexpr ignored when rendering other formats (tex, ...) ?
or is there a way (similar to #ifdef) to only provide some content to 
some renderers ?

Romain

-- 
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://tr.im/ztCu : RGG #158:161: examples of package IDPmisc
|- http://tr.im/yw8E : New R package : sos
`- http://tr.im/y8y0 : search the graph gallery from R



More information about the R-devel mailing list