0
當我嘗試document()
或build()
使用devtools包我的[R包,我得到錯誤信息:錯誤:壞「S3method」指令:S3method(「」)
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, ...){
...
}
或者只是刪除NAMESPACE文件並讓roxygen2重新創建它。 – Roland