r-lib / roxygen2

Generate R package documentation from inline R comments
https://roxygen2.r-lib.org
Other
595 stars 233 forks source link

roxygen2 suggests @exportS3method but then does not accept the tag #1675

Open LukasWallrich opened 1 week ago

LukasWallrich commented 1 week ago
#' @exportS3method
as.data.frame.bibliography <- function(x, ...) {
#...
}

produces

✖ import_export_helpers.R:1148: @exportS3method is not a known tag.
✖ import_export_helpers.R:1150: S3 method `as.data.frame.bibliography` needs
  @export or @exportS3method tag.

It works with @export, and I am not sure if @exportS3method would do anything different - so it might just be about removing that from the second error message?

maxheld83 commented 2 days ago

I think this a typo, try:

#' exportS3Method

(capitalised M)

discussed earlier/fixed in https://github.com/r-lib/roxygen2/issues/1591