假设我正在RStudio中使用select name, status, message, completion_status,
TO_CHAR( FROM_TZ( CAST(DATE '1970-01-01' + (1/24/60/60/1000) * completed AS TIMESTAMP), 'America/New_York'), 'yyyy-mm-dd HH24:MI:SS')
as completed from Result;
构建一个R包。
假设我也有带有以下代码的R源文件:
=TEXT(A1, "[$-1010409]d/m/yyyy")
现在,devtools
运行得很好,除了关于缺少名称/标题的警告:
#' @param object An object
#' @param data Numeric vector or data.frame
#' @param Fun Function. Default function is \code{sum}
#' @param ... Extra named arguments passed to FUN
#' @rdname myGeneric
#' @export
setGeneric("myGeneric", function(object, data, FUN, ...)
{standardGeneric ("myGeneric")} )
#' @rdname myGeneric
setMethod("myGeneric", c("numeric", "numeric", "function"),
function(object, data, FUN, ...) {
return(42)
}
)
但是,如果我像这样在函数定义中注释devtools::document(roclets=c('rd', 'collate', 'namespace'))
行:
> devtools::document(roclets=c('rd', 'collate', 'namespace'))
Updating gwasrapidd documentation
Loading gwasrapidd
Writing NAMESPACE
Writing NAMESPACE
Warning message:
myGeneric.Rd is missing name/title. Skipping
然后再次运行return(42)
,现在我得到一个错误:
#' @param object An object
#' @param data Numeric vector or data.frame
#' @param Fun Function. Default function is \code{sum}
#' @param ... Extra named arguments passed to FUN
#' @rdname myGeneric
#' @export
setGeneric("myGeneric", function(object, data, FUN, ...)
{standardGeneric ("myGeneric")} )
#' @rdname myGeneric
setMethod("myGeneric", c("numeric", "numeric", "function"),
function(object, data, FUN, ...) {
#return(42)
}
)
我的问题是为什么?是devtools::document(roclets=c('rd', 'collate', 'namespace'))
的错误吗?
打包版本: