[Roxygen-devel] documenting multiple methods for a generic S4 method
Manuel J. A. Eugster
Manuel.Eugster at stat.uni-muenchen.de
Tue Oct 5 07:27:09 CEST 2010
Hi Vinh,
the @rdname (only in Rd2) merges different documentations; so
setting
#' @rdname genF-methods
in front of every method should produce one Rd file with all
methods documented.
Manuel.
On 10/5/10 4:41 AM, Vinh Nguyen wrote:
> Dear list,
>
> Suppose I define multiple S4 methods in my .R file. For example,
>
> setGeneric("genF", function(fitobj, ...) standardGeneric("genF"))
> setMethod("genF", signature(fitobj="lm"), function(fitobj){ print("lm") })
> setMethod("genF", signature(fitobj="glm"), function(fitobj){ print("glm") })
>
> If I run package.skeleton() on my workspace, I'll get a
> genF-methods.Rd file in the man directory that appears to have
> template to document both methods.
>
> If I use roxygen and place "@name genF-methods" in the documentation,
> then only one (the later one in the .R file) gets documented in the
> genF-methods.R file; genF-methods gets written twice (so first
> documentation is overwritten). How should we be documenting multiple
> S4 methods with roxygen?
>
> Thanks.
> Vinh
> --
> Vinh Nguyen
> Department of Statistics
> Donald Bren School of ICS
> 2231 Bren Hall
> University of California, Irvine
> Irvine, CA 92607
> vqnguyen at uci.edu | http://www.ics.uci.edu/~vqnguyen/
> Schedule a meeting: http://tungle.me/VinhNguyen
> _______________________________________________
> Roxygen-devel mailing list
> Roxygen-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/roxygen-devel
More information about the Roxygen-devel
mailing list