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

From: cstrato <cstrato_at_aon.at>
Date: Sat, 12 Mar 2011 14:38:50 +0100

Dear all,

Meanwhile I found my mistake.
I forgot to add class QualTreeSet to 'initialize-methods.Rd'. However, I am not sure if I should make 'initialize' public at all.

Best regards
Christian

On 3/11/11 9:58 PM, cstrato wrote:
> 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
> Extensions'.
>
> 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':
>
> setClass("QualTreeSet",
> representation(qualtype = "character",
> qualopt = "character"
> ),
> contains=c("ProcesSet"),
> prototype(qualtype = "rlm",
> qualopt = "raw"
> )
> )#QualTreeSet
>
> setMethod("initialize", "QualTreeSet",
> function(.Object,
> 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;
> .Object;
> }
> )#initialize
>
>
> However, here is my code for a similar class 'ExprTreeSet' (which is the
> class from where I have copied the code):
>
> setClass("ExprTreeSet",
> representation(exprtype = "character",
> normtype = "character"
> ),
> contains=c("ProcesSet"),
> prototype(exprtype = "none",
> normtype = "none"
> )
> )#ExprTreeSet
>
> setMethod("initialize", "ExprTreeSet",
> function(.Object,
> 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;
> .Object;
> }
> )#initialize
>
> 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)
>
> locale:
> [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
> Christian
> _._._._._._._._._._._._._._._._._._
> 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
> _._._._._._._._._._._._._._._._._._
>
>



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sat 12 Mar 2011 - 13:42:21 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 12 Mar 2011 - 15:40:31 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive