[Roxygen-devel] Roxygen & S4

Hadley Wickham hadley at rice.edu
Tue Feb 21 09:35:40 CET 2012


On Mon, Feb 20, 2012 at 10:06 PM, Steve Lianoglou
<mailinglist.honeypot at gmail.com> wrote:
> Hadley,
>
> Sorry for pestering, but what's the right way to comment a setGeneric
> and its derivatives, eg:
>
> ##' Make your object think
> ##'
> ##' We are building self aware objects
> ##'
> ##' @export
> ##'
> ##' @param x The object to make smarter
> setGeneric("pontificate", function(x, ...) standardGeneric("pontificate"))
>
> ##' <how do we specify `something` specific behavior?
> ##'
> ##' (or do we not do that and comment the setGeneric as ferociously as
> possible?)
> setMethod("pontificate", c(x="something"), function(x, ...) {
>
> })

Just like that?  What are you expecting that's not happening?  If you
want the method to be documented inside the generic, you'd also need
@rdname pontificate

Hadley

-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/


More information about the Roxygen-devel mailing list