setGeneric(); R CMD check

David James dj@research.bell-labs.com
Tue, 10 Sep 2002 15:09:46 -0400


1. Is it always the case that when defining generic functions in
   a package, the package needs to be installed as a binary package
   to avoid having the generic functions in the .GlobalEnv?

2. Defining a generic function in a "non-binary" package triggers 
   a check warning

     $ R CMD check ...
     ...
     * checking for code/documentation mismatches ... WARNING
     Objects with usage in documentation object 'dbApply' but missing from code:
     [1] "dbApply"

   It seems that the generic function dbApply lives in the .GlobalEnv when
   the package is attached (w. library), but not in the package's environment.
   I presume that's why check triggers the warning.

   Is this the case?

*If* this is the case (i.e., packages with setGeneric()s need to be installed
as binaries), perhaps it should be documented somewhere.

... or am I missing something very basic?

> version
         _                           
platform i686-pc-linux-gnu           
arch     i686                        
os       linux-gnu                   
system   i686, linux-gnu             
status   Under development (unstable)
major    1                           
minor    6.0                         
year     2002                        
month    09                          
day      09                          
language R

-- 
David A. James
Statistics Research, Room 2C-253            Phone:  (908) 582-3082       
Bell Labs, Lucent Technologies              Fax:    (908) 582-3340
Murray Hill, NJ 09794-0636
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._