klutometis/roxygen — Issue #75: Ability to add class-specific alias without generic alias
Author: joey711
Created: 2012-01-21 00:08:53+00:00
State: open

This is clearly an issue with S4 methods, but may also apply to S3 generics.

The following roxygen-header for a class-specific method extension to the base S4 generic, `show`, should add just a specific alias to the Rd file (here it would be `myPkgSpClass-class.Rd`). However, it also adds the generic alias (`\alias{show}`) to the documentation as well. This causes a conflict with the base documentation for `show`, and is a problem that could result in lots of disambiguation-forks in the doc-UI of a package that has lots of specific extensions to already-available methods:

```R

#' @export
#' @aliases show,myPkgSpClass-method
#' @rdname myPkgSpClass-class
setMethod("show", "myPkgSpClass", function(object){ show(NA) })

```

In fact there should be no conflict, and the `myPkgSpClass`-specific alias of `show` should point to the `myPkgSpClass-class` documentation instead.

This issue was first described as a question on StackOverflow, and further details can be found there:
http://stackoverflow.com/questions/8947483/how-to-add-class-specific-alias-without-generic-alias-using-roxygen2