【发布时间】:2016-07-31 16:04:36
【问题描述】:
当我尝试使用 devtools 包 document() 或 build() 我的 R 包时,我收到错误消息:
Error: bad 'S3method' directive: S3method("")
发生此错误时,我正在处理函数tabyl(),现在我无法摆脱它,即使对函数头进行了很多调整。该功能现在应该可以工作了;供参考,标题是:
#' @export
tabyl <- function(...) UseMethod("tabyl")
#' @inheritParams tabyl
#' @describeIn tabyl Create a frequency table from a vector, returned as a data.frame, showing percentages and with or without including \code{NA} values. A fully-featured alternative to \code{table()}.
#' @export
tabyl.default <- function(vec, sort = FALSE, show_na = TRUE, ...) {
...
}
#' @inheritParams tabyl.default
#' @param .data a data.frame.
#' @param ... arguments passed to tabyl.default.
#' @describeIn tabyl Create a frequency table from a variable in a data.frame, returned as a data.frame, showing percentages and with or without including \code{NA} values. A fully-featured alternative to \code{table()}.
#' @export
tabyl.data.frame <- function(.data, ...){
...
}
【问题讨论】: