我roxygen2
用来记录我正在开发的包的数据集。我知道您可以使用 roxygen 来记录数据集,但Shane 的回答最终暗示了一个 hack,虽然我宁愿避免这样做。所以,我的问题是:
我应该将 roxygen 文档放在哪里?
我目前在我的 /R 文件夹中anorexia.sub.roxygen
有一个厌食症数据集的数据文档文件 ( )
因为据我所知,这是 roxygen2 唯一会寻找它的地方:
#' Family Treatment Weight change data for young female anorexia patients.
#'
#'
#' The MASS package includes the dataset \code{anorexia}, containing pre and
#' post treatment weights for young female anorexia patients. This is a subset
#' of those data, containing only those patients who received Family Treatment.
#'
#'
#' @name anorexia.sub
#' @docType data
#' @format A dataframe with 17 observations on the following 2 variables, no
#' NAs.
#'
#' \describe{
#'
#' \item{list("Prewt")}{Pretreatment weight of subject, in pounds.}
#'
#' \item{list("Postwt")}{Postreatment weight of subject, in pounds.}
#'
#' }
#' @references Venables, W. N. and Ripley, B. D. (2002) Modern Applied
#' Statistics with S. Fourth edition. Springer.
#' @source Hand, D. J., Daly, F., McConway, K., Lunn, D. and Ostrowski, E. eds
#' (1993) A Handbook of Small Data Sets. Chapman & Hall, Data set 285 (p.
#' 229)
#' @keywords datasets
NULL
roxygen2
生成文档就好了。但是,然后它anorexia.sub.roxygen.R
添加到我的Collate
领域DESCRIPTION
:
Collate:
'granova.R'
'theme-defaults.R'
'granovagg.1w.R'
'granovagg.contr.R'
'granovagg.ds.R'
'help.R'
'anorexia.sub.roxygen.R'
我想我的问题是:我怎样才能拥有 roxygen2
- 自动从 roxygen 块生成数据文档,
- 不要将数据文档文件添加到
Collate
调用中,并且 - 避免需要破解的解决方案