[Rd] S4: Documenting several fields at once

Christophe Genolini cgenolin at u-paris10.fr
Mon Mar 22 19:16:45 CET 2010


Hi all,
I defined an S4 object in which there is a lot of fields that have very 
similar names and purposes.
--- 8< ----------
setClass(
   Class="foo",
   representation=representation(
      c2="list",
      c3="list",
      c4="list",
      c5="list",
      c6="list",
      c7="list",
        ...
      c26="list"
  )
)
--- 8< ----------

In the documentation (Rd file), is there a way to describe only one of 
the field, then say all the other work the same way?

--- 8< ----------
\section{Slots}{
  \describe{
    \item{\code{c2}}{list of Clustering with 2 clusters.}
    \item{\code{c3}}{list of Clustering with 3 clusters.}
    \item{\code{c4} ... \code{c26}}{list of Clustering with 4, ..., 26 
clusters.}
  }
}
--- 8< ---------

Thanks

Christophe



More information about the R-devel mailing list