Hi, I'm new to this mailing list and to R-programming so if the question is stupid I apologize.
I have to create a package, which includes an S4-class called "BList". For objects of this class I implemented a method "show", which displays the first 15 data-lines of the object. I further implemented a method "showall", which displays the whole data in the object. For the "showall"-method i first defined a generic method: setGeneric("showall", function(object){ out<- standardGeneric("showall") }) and then defined the method using setMethod("showall", signature(object="BList"), function(object){ ... } My problem: I don't know how to document the "showall"-method for the package. If I just add the method in the documentation 'BList-class.Rd' as an alias using: \alias{showall,BList-method} and then add it to the list of methods: \section{Methods}{ \describe{ \item{show}{\code{signature(object = "BList")}: Short output} \item{showall}{\code{signature(object = "BList")}: Long output} } } I get the following warning (when I check the package for installation): * checking for missing documentation entries ... WARNING Undocumented code objects: showall All user-level objects in a package should have documentation entries. I then used promptMethods() to build a seperate documentation-file 'showall-methods.Rd'. If I then run the check I get the warning: * checking Rd files ... WARNING Rd files with duplicated alias 'showall,BList-method': BList-class.Rd showall-methods.Rd If I then remove the alias line '\alias{showall,BList-method}' from either 'BList-class.Rd' or 'showall-methods.Rd' I get the first warning ("Undocumented code objects..."). My question: how do you document methods of S4-classes in a package? It works fine for the method "show" but it does not work for "showall", for which I had to define the generic function first. What can I do to fix this, or is it better to just define "showall" as a function and not as a method? Thanks a lot, Elton G. _________________________________________________________________ Learn how to add other email accounts to Hotmail in 3 easy steps. [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.