数据包-r文档

数据包-r文档,r,devtools,r-package,roxygen2,R,Devtools,R Package,Roxygen2,我正在创建一个包,自动生成用于文档的Rd文件与Roxygen2的函数配合得很好(以下是我的R文件示例,它使用Roxygen2::roxygenise()提供了一个良好的Rd文件: 在最后一行后写入NULL: ...... #' @examples #' ## tabflows #' data(tabflows) NULL 我想你必须在最后一行之后写NULL(没有#',只写NULL)。确实有效,谢谢!好的,所以我转换成一个答案。 #' @title Commuters #' @name tabf

我正在创建一个包,自动生成用于文档的Rd文件与Roxygen2的函数配合得很好(以下是我的R文件示例,它使用Roxygen2::roxygenise()提供了一个良好的Rd文件:


在最后一行后写入
NULL

......
#' @examples
#' ## tabflows
#' data(tabflows)
NULL

我想你必须在最后一行之后写
NULL
(没有
#'
,只写
NULL
)。确实有效,谢谢!好的,所以我转换成一个答案。
#' @title Commuters
#' @name tabflows
#' @description Data on commuters between Urban Areas in Paris region in 2014.
#' Fields: \cr
#' \itemize{
#' \item{ORI: Code of the urban area of residence}
#' \item{DES: Code of the urban area of work}
#' \item{MODE: Transport mode used by the workers}
#' \item{FLOW: Number of commuters between i and j}
#' \item{DIST: distance between the urban area of work and the urban area of residence}
#' \item{DISTTOT: total distance between the urban area of work and the urban area of residence}
#' \item{ORILIB: Name of the urban area of residence}
#' \item{DESLIB: Name of the urban area of work}
#' }
#' @docType data
#' @examples
#' ## tabflows
#' data(tabflows)
......
#' @examples
#' ## tabflows
#' data(tabflows)
NULL