Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

8
  • 10
    Correct. But @method + @export is equivalent to @s3method Commented Aug 26, 2011 at 11:46
  • 2
    When I tested in the roxygen (0.1-2) and the roxygen2 (2.1), @method + @export is NOT equivalent to @S3method as SFun28 said. @S3method did not generate \method entries. I think that both tags are required in the roxygen (0.1-2) and the roxygen2 (2.1). Commented Aug 29, 2011 at 0:41
  • 10
    For anyone still coming here years later, as of Roxygen2 6.0.1 @S3method is deprecated and gives Warning: script.R:302: @S3method is deprecated. Please use @export instead. @method + @export does the trick. R CMD check still complains about just using @export, though. Commented May 23, 2018 at 5:01
  • 2
    As of roxygen2-7.1.1, no recommendation is given, just @S3method unknown tag. Instead, I've found using @exportS3Method generic class works. Commented Aug 26, 2021 at 17:36
  • 1
    Hey Guys, for beginners like me it wouldn't hurt to mention, that writing simply @method generic method and @export aren't enough to test if it worked or not. after doing so, you also need to build the documentation and use devtools::load_all(".") again to let the declaration as a s3 method take effect in real code :P - just a beginner here, so please bear with me. Commented Mar 25, 2022 at 8:02