[Rd] WARNING Undocumented S4 methods 'initialize' - why?

cstrato cstrato at aon.at
Fri Mar 11 21:58:15 CET 2011

Dear all,

I am just writing the documentation file for S4 class 'QualTreeSet' and 
get the following warning with R CMD check:

* checking for missing documentation entries ... WARNING
Undocumented S4 methods:
   generic 'initialize' and siglist 'QualTreeSet'
All user-level objects in a package (including S4 classes and methods)
should have documentation entries.
See the chapter 'Writing R documentation files' in manual 'Writing R

All my S4 classes have a method 'initialize' and R CMD check has never 
complained. Thus, do you have any idea why I get suddenly this warning 
for method 'initialize'?

Here is the code for 'QualTreeSet':

    representation(qualtype = "character",
                   qualopt  = "character"
    prototype(qualtype = "rlm",
              qualopt  = "raw"

setMethod("initialize", "QualTreeSet",
             qualtype = "rlm",
             qualopt  = "raw",
       if (qualtype == "") qualtype <- "rlm";
       if (qualopt  == "") qualopt  <- "raw";

       .Object <- callNextMethod(.Object,
                                 qualtype = qualtype,
                                 qualopt  = qualopt,
       .Object at qualtype = qualtype;
       .Object at qualopt  = qualopt;

However, here is my code for a similar class 'ExprTreeSet' (which is the 
class from where I have copied the code):

    representation(exprtype = "character",
                   normtype = "character"
    prototype(exprtype = "none",
              normtype = "none"

setMethod("initialize", "ExprTreeSet",
             exprtype = "none",
             normtype = "none",
       if (exprtype == "") exprtype <- "none";
       if (normtype == "") normtype <- "none";

       .Object <- callNextMethod(.Object,
                                 exprtype = exprtype,
                                 normtype = normtype,
       .Object at exprtype = exprtype;
       .Object at normtype = normtype;

In this case R CMD check does not complain, so why does it in the case 
of 'QualTreeSet'?

Here is my:
 > sessionInfo()
R version 2.12.1 (2010-12-16)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

[1] C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] xps_1.11.4

Thank you in advance
Best regards
C.h.r.i.s.t.i.a.n   S.t.r.a.t.o.w.a
V.i.e.n.n.a           A.u.s.t.r.i.a
e.m.a.i.l:        cstrato at aon.at

More information about the R-devel mailing list