我很可能会直接丢失一些东西。但是似乎在donttest
中被R check
正确地忽略了的示例在Travis CI的等效检查期间运行。
Here是一些使用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)
#'
#' }
日志here的第3536行
- 使用--run-donttest检查示例...错误
第4193行:
rawr(。,to_file = T)中的错误:使用T代替TRUE
注意:实际的R错误-使用T而不是TRUE-很容易解决-我很好奇为什么所有示例都运行
注意:R CMD check --as-cran
在本地运行时通过(0个警告,0个注释,0个错误)
答案 0 :(得分:3)
--run-donttest
表示要检查用\donttest
包装的示例。
我认为您需要将其包装在\dontrun{}
而不是\donttest{}
周围。 \ donttest {}是可以运行该示例的时间,但是需要很多时间。另一方面,\ dontrun {}是示例可能返回错误的时间。同样,我对这个答案不是100%肯定。
答案 1 :(得分:1)