I can use \item to make a list in .Rd files.
\item{blah}{blah}
But it seems that I can not create a nested list by put \item within another \item
as in
\item{blah}{
\item{blah1}{some}
\item{blah2}{thing}
}
Does anybody know a way to generate a nested list in R documentation? Thanks.
Here's an example (ignore the #'
if you don't use roxygen):
#' \itemize{
#' \item First level, itemize, first item
#' \itemize{
#' \item Second level, itemize, first item
#' \item Second level, itemize, second item
#' \enumerate{
#' \item Third level, enumerate, first item
#' \item Third level, enumerate, second item
#' }
#' }
#' \item First level, itemize, second item
#' }
Which results in (I used it in a Description block):
If you use roxygen to generate your documentation, this can be accomplished simply using rmarkdown. The below code produces the same output as displayed in hrbrmstr's answer.
#' * First level, itemize, first item
#' * Second level, itemize, first item
#' - Second level, itemize, second item (- and * are equivalent)
#' 1. Third level, enumerate, first item
#' 2. Third level, enumerate, second item
#' * First level, itemize, second item
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With