我正在尝试将数据集文档添加到我的包中的函数中,并遵循 roxygen2 提供的有关记录其他对象的格式。但是,在使用
devtools::document()
更新软件包后,我不断收到错误
我正在尝试将文档添加到我的包中的函数中。我能够成功创建包,并且在加载时也能够使用这些功能。我正在尝试记录我的数据集函数并遵循此格式
#' @format A data frame with the following columns:
#' \describe{
#' \item{`Player Name`}{A chracter string. The name of the athlete}
#' \item{`Age Group @ Testing`}{A chracter string. Athletes Age Group at the time of testing}
#' \item{`Gender`}{A character String. The gender of the athlete}
#' \item{`Testing Date`}{A date. The data collection date for each athlete}
#' \item{`Birth Year`}{The year of birth for every athlete}
#' }
但是,在运行
devtools::document()
更新软件包后,我不断收到此错误
Warning messages:
1: [maturation_cm.R:8] @format has mismatched braces or quotes
随后“man”文件夹中的 .Rd 文件中没有为此编写任何内容。
不知道是我格式错误还是什么?这是我第一次写自己的包
您的问题是缺少
describe{
的结束括号。这个括号在你的代码中永远不会关闭。
只需添加以下代码的最后一行,您的示例就可以运行。
#' @format A data frame with the following columns:
#' \describe{
#' \item{`Player Name`}{A chracter string. The name of the athlete}
#' \item{`Age Group @ Testing`}{A chracter string. Athletes Age Group at the time of testing}
#' \item{`Gender`}{A character String. The gender of the athlete}
#' \item{`Testing Date`}{A date. The data collection date for each athlete}
#' \item{`Birth Year`}{The year of birth for every athlete}
#' }