[R-pkg-devel] documentation of generic '['
Joris Meys
Joris.Meys at Ugent.be
Wed Mar 9 14:14:56 CET 2016
Hi Stefano,
did you try moving the method to a separate file already? I've noticed that
documentation of classes and methods in the same .Rd file isn't very
straightforward. You need a \usage{} section to document the method, and
that's likely to cause trouble when used in a class document.
In any case, afaik you need a :
\S4method{generic}{signature_list}(argument_list)
in the usage section, and you have to refer to the method as
\alias{[, encore,ANY,ANY-method}
See
https://cran.r-project.org/doc/manuals/R-exts.html#Documenting-S4-classes-and-methods
Cheers
Joris
On Wed, Mar 9, 2016 at 1:10 PM, Berri, Stefano <sberri at illumina.com> wrote:
> Hi.
>
> I am having problems with R CMD check around documentation of method "[".
> I am pretty sure I didn't have this WARNING when I used R-3.0.2. I have
> tried many things, but I am not sure how to fix it.
>
>
> $ R CMD check encore
> ...
> * using R version 3.2.3 (2015-12-10)
> ...
> * checking for missing documentation entries ... WARNING
> Undocumented S4 methods:
> generic '[' and siglist 'encore,ANY,ANY'
> All user-level objects in a package (including S4 classes and methods)
> should have documentation entries.
> See chapter 'Writing R documentation files' in the 'Writing R
> Extensions' manual.
> ...
>
> Everything else is OK, there is an unrelated NOTE we are addressing
>
> ##### R CODE ######
>
> setMethod("[", "encore", function(x,i,j,drop){
> ... code here ...
> })
>
> ##### DOCUMENTATION #####
>
> \name{encore-class}
> \Rdversion{0.1}
> \docType{class}
> \alias{encore}
> \alias{subtraction-class}
> \alias{encore-class}
> \alias{dConn-class}
>
> \alias{[,encore-method}
>
> ... description of the class, no explicit description of method "[" though
>
> ##########################
>
> I have tried various things searching around, but I seem to introduce new
> WARNINGS without removing the one I have.
>
> I have read the "Writing R documentation files", but there is no special
> description of method "[", and I am struggling to understand what's wrong.
>
> Thank you very much in advance
>
> Stefano
>
> ______________________________________________
> R-package-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>
--
Joris Meys
Statistical consultant
Ghent University
Faculty of Bioscience Engineering
Department of Mathematical Modelling, Statistics and Bio-Informatics
tel : +32 9 264 59 87
Joris.Meys at Ugent.be
-------------------------------
Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php
[[alternative HTML version deleted]]
More information about the R-package-devel
mailing list