[R-pkg-devel] Roxygen: function documentation to get \item{...} in .rd file

Joris Meys Joris.Meys at ugent.be
Mon Mar 12 20:15:28 CET 2018

Hi Knut,

If you want to add parameters, you need to use the tag @param :

#' @param x a numeric vector

will translate to:

\item{x}{a numeric vector}

in the \arguments section of the .Rd file.

If you want to add extra description lists (eg for elements of a list in
the output), you can use \describe:

#' \describe{
#'    \item{name}{a numeric vector with names}
#' }

If you're not familiar with roxygen2 at all, you can start at the vignette
here: https://cran.r-project.org/web/packages/roxygen2/vignettes/rd.html

More information can be found in the book of Hadley on writing packages,
section about documentation : http://r-pkgs.had.co.nz/man.html


On Mon, Mar 12, 2018 at 8:07 PM, Knut Krueger <rhelp at krueger-family.de>

> I am  converting a package from creating the .rd files manually to
> roxygen.
> I do not know how to add the additional parameters to the function
> description, so that the  \item{...}{ some parameters } will be created in
> the .rd file
> Kind regards Knut
> ______________________________________________
> R-package-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel

Joris Meys
Statistical consultant

Department of Data Analysis and Mathematical Modelling
Ghent University
Coupure Links 653, B-9000 Gent (Belgium)

tel: +32 (0)9 264 61 79
Biowiskundedagen 2017-2018

Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php

	[[alternative HTML version deleted]]

More information about the R-package-devel mailing list