This is a dirty hack, but it works: just register functions as methods, in addition to exporting .
So yours NAMESPACEcan have two lines:
export(tail.g)
S3method(tail, g)
, , CRAN. , , - , methods(class="g") methods("tail"). .
roxygen2 @rawNamespace, NAMESPACE S3method:
writeLines(
"#' Check an argument
#'
#' Checks an argument.
#' @param ... Some arguments.
#' @return A value.
#' @export tail.g
#' @rawNamespace S3method(tail, g)
tail.g <- function(...) 0",
"test/R/tail.g.R"
)