我有 R6Class 的文档:
#' Root component that don't have parent,
#'
#' It should not be used directly, only using \code{\link{pkg::component}} function.
#'
#' @name BaseComponent
#' @importFrom R6 R6Class
#' @docType class
#' @keywords components, architecture, structure
和 roxygen 显示警告:
Warning: [c:\projects\pkg\R\components.R:1] @title Missing name
我不知道为什么它显示第 1 行,我的代码不在第 1 行。
添加@title 不会改变任何我不断收到此警告的内容。
最佳答案
警告混淆了文件的最后一行:
#' init extend on base battery component
BaseComponent$extend <- make.extend(BaseComponent)
更换
#'
与 ##
解决了这个问题。
关于r - @title Roxygen 中缺少名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60779639/