很有可能,我直接漏掉了什么。但是,似乎包裹在 donttest
该 R check
在Travis CI的等价检查中,正确地忽略了。
喏 是一些使用roxygen2的R函数文档。
#' @examples
#' \donttest{
#' library(dplyr)
#'
#' # Write output to a temp file
#' "https://www.datacamp.com/community/tutorials/R-nlp-machine-learning" %>%
#' rawr(to_file = TRUE)
#'
#' }
在日志的第3536行 此处
- 用--run-donttest检查例子...... ERROR
第4193行。
在rawr(., to_file = T)中出错:用T代替了TRUE。
注意:实际的R错误--使用T而不是TRUE--很容易解决--我只是好奇为什么要运行这些例子。
注意:在本地运行时,通过(0个警告,0个注意,0个错误)。R CMD check --as-cran
本地运行时,通过(0警告,0注意,0错误)。
这个 --run-donttest
表示用 \donttest
是要检查的。
我觉得你需要把它包起来。\dontrun{}
而不是 \donttest{}
. \donttest{}是指例子可以运行,但需要花费很多时间。另一方面,\dontrun{}是指例子很可能会返回一个错误。同样,我对这个答案也不是100%确定。