[R] Glitch when creating online help

Hong Ooi Hong.Ooi at iag.com.au
Wed Dec 14 05:24:08 CET 2005



I'm writing up the online help for a package I'm developing (in-house
only, sorry), and I've come across an odd glitch when trying to nest a
list inside the "arguments" section of the .Rd file. I was just
wondering if anyone could provide some insights. I'm using R 2.2.0 on
Windows XP, along with ActivePerl 5.8.7 (build 815), MikTeX 2.4, and the
tools downloaded from http://www.murdoch-sutherland.com/Rtools/ .

Here is some code to reproduce the glitch. First, in R:

f <- function(x) x
package.skeleton("foo", list="f")

This creates the package skeleton, with a template f.Rd provided. Edit
f.Rd to contain

\title{ ~~function to do ... ~~ }
  ~~ A concise (1-5 lines) description of what the function does. ~~
    \item{item1}{ This is item 1. }
    \item{itemlist}{ Here is a list. \describe{
        \item{subitem1}{Item 1 of the list.}
        \item{subitem2}{Item 2 of the list.}
    \item{item3}{ This is the item after the list. }

Then at the command prompt:

R CMD INSTALL --build foo

Once the package has been created, in R type:


The result looks like

f                    package:foo                    R Documentation

~~function to do ... ~~


     ~~ A concise (1-5 lines) description of what the function does. ~~




   item1: This is item 1. 

itemlist: Here is a list.  .in +5

     subitem1 Item 1 of the list.

     subitem2 Item 2 of the list.

   item3: This is the item after the list.


Note the ".in +5" at the top of the nested list. This is only in the
online help within R, not the html version.

Hong Ooi
Senior Research Analyst, IAG Limited
388 George St, Sydney NSW 2000
+61 (2) 9292 1566


The information transmitted in this message and its attachme...{{dropped}}

More information about the R-help mailing list