Hadley, Thanks for the quick reply. I'm afraid I'm still a bit over my head on this one.
Since concatenate ("c") is neither a complex method nor my own generic, I gather I need your middle option. If I just do: #' @rdname c-codeDefinition setMethod("c", signature("codeDefinition"), function(x, ...) new("ListOfcodeDefinition", list(x, ...))) Then check complains about missing \name and \title for the method. If I add a name and title: #' concatenate #' #' concatenate #' @rdname c-codeDefinition setMethod("c", signature("codeDefinition"), function(x, ...) new("ListOfcodeDefinition", list(x, ...))) Check complains * checking for code/documentation mismatches ... WARNING Codoc mismatches from documentation object 'c,codeDefinition-method': \S4method{c}{codeDefinition} Code: function(x, ..., recursive = FALSE) Docs: function(x, ...) Argument names in code not in docs: recursive Which seems to suggest that I should be defining the arguments as `function(..., recursive = FALSE)`, which does indeed match the documentation shown by ?c. However if I do so, check really complains that this format is incorrect: Error in conformMethod(signature, mnames, fnames, f, fdef, definition) : in method for ācā with signature āx="codeDefinition"ā: formal arguments (x = "codeDefinition", ... = "codeDefinition", recursive = "codeDefinition") omitted in the method definition cannot be in the signature completely confused as how to document a concatenate method for S4, Carl On Tue, Jan 21, 2014 at 12:10 PM, Hadley Wickham <h.wick...@gmail.com>wrote: > > Um, I'm still unclear on what information I do need to properly document > the > > S4 methods. Without adding any roxygen documentation, check is unhappy, > > e.g. > > > > Undocumented S4 methods: > > generic 'c' and siglist 'codeDefinition' > > > > What should I be doing here? > > Adding some documentation? ;) > > You need to decide how to document the methods. There's basically three > options: > > * document methods with generic (only an option if you created the > generic) - @rdname generic > * document methods with class (only an option if you created the > class) @rdname class-classname (I think) > * document method in its own file (only suitable if it's a complex method) > > Hadley > > -- > http://had.co.nz/ > -- Carl Boettiger UC Santa Cruz http://carlboettiger.info/
_______________________________________________ Roxygen-devel mailing list Roxygen-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/roxygen-devel