氧气医生的任意切片

氧气的工作方式似乎是,第一行是 \title,其他所有内容都在 \details中,然后任何 @foo指令处理这些内容。但是 R 文档要丰富得多。我可以把 "\section{Llamas}{Are they ungulates?}"放进去。档案。

但除了细节我没法让 Roxygen 做其他事我是不是漏掉了什么?

我有一个粗糙的解决方案,这是坚持一个无与伦比的 }之前,我的 \section。这就结束了 \details部分。然后我不得不放入一个结束 },因为氧刺一个在想它关闭 \details。Eeeeeurrrrrrrr.

4572 次浏览

This support has been added (at least in roxygen2). You just need to add @section Llamas: and then anything after that until a new directive is met will be in a Llamas section. Here is an example

#' Llama llama llama
#'
#' More about llamas
#'
#' @section Llamas:
#' Are they ungulates?
#'
#' @section Not llamas:
#' This section is not about llamas.  It is not very interesting.
#'
#' @param notused A parameter that isn't used at all!
#' @export
llama <- function(notused){
return("LLAMA LLAMA LLAMA")
}

which gives the following for the .Rd file

\name{llama}
\alias{llama}
\title{Llama llama llama}
\usage{
llama(notused)
}
\arguments{
\item{notused}{A parameter that isn't used at all!}
}
\description{
More about llamas
}
\section{Llamas}{
Are they ungulates?
}


\section{Not llamas}{
This section is not about llamas.  It is not very
interesting.
}