Re: [R] Glitch when creating online help

From: Hong Ooi <Hong.Ooi_at_iag.com.au>
Date: Wed 14 Dec 2005 - 17:20:50 EST


Ah, I think I've solved it. Apparently \describe needs to have a newline before it, or things get funny. Thus

\arguments{

    \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.}
        }

    }
}

works fine. OTOH,

\details{ Here is another list. \describe{

    \item{subitem1}{Item 1 of the list.}     \item{subitem2}{Item 2 of the list.}     }
}

(no nesting of \describe within an \item) gives the same glitch as described below. (Maybe I need to brush up on my TeX....)

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

-----Original Message-----
From: r-help-bounces@stat.math.ethz.ch
[mailto:r-help-bounces@stat.math.ethz.ch] On Behalf Of Hong Ooi
Sent: Wednesday, 14 December 2005 3:24 PM
To: r-help@stat.math.ethz.ch
Subject: [R] Glitch when creating online help


________________________________________________________________________
_______________


Hi,

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


================

\name{f}
\alias{f}
\title{ ~~function to do ... ~~ }
\description{
~~ A concise (1-5 lines) description of what the function does. ~~ }
\usage{f(x)}
\arguments{
\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: library(foo) ?f The result looks like ================ f package:foo R Documentation ~~function to do ... ~~ Description: ~~ A concise (1-5 lines) description of what the function does. ~~ Usage: f(x) Arguments: 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}} ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Wed Dec 14 17:32:15 2005

This archive was generated by hypermail 2.1.8 : Wed 14 Dec 2005 - 20:25:40 EST