[Roxygen-devel] Roxygen & S4
Steve Lianoglou
mailinglist.honeypot at gmail.com
Mon Feb 20 22:06:32 CET 2012
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, ...) {
})
On Mon, Feb 20, 2012 at 2:05 PM, Hadley Wickham <hadley at rice.edu> wrote:
>> Is there an update "gold reference" for how we'd document S4 classes
>> (setClass) and method definitions? (setGeneric vs. setMethod)?
>>
>> Are the hints found here still the right way to go, more or less?:
>>
>> http://stackoverflow.com/questions/4396768/how-to-properly-document-s4-and-methods-using-roxygen
>
> Yes, that's ok, but you shouldn't need to manually set the rdname
> (it's a bug if you do), and @slot isn't supported yet. I'll try and
> add that before we release the next version.
>
> Hadley
>
> --
> Assistant Professor / Dobelman Family Junior Chair
> Department of Statistics / Rice University
> http://had.co.nz/
--
Steve Lianoglou
Graduate Student: Computational Systems Biology
| Memorial Sloan-Kettering Cancer Center
| Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact
More information about the Roxygen-devel
mailing list