[BioC] NAMESPACES, export, and unit tests

Paul Shannon pshannon at systemsbiology.net
Mon May 1 21:43:21 CEST 2006


Hi all,

In a package ('gaggle') I am about to submit to Bioc, I have
run into a small problem.

    1) In inst/unitTests/gaggleTest.R I call two functions from gaggle.R
       which are otherwise hidden.

            .gaggleNetworkToGraphNEL
            .graphNELtoGaggleNetwork

       It is very helpful to call these methods in gaggleTest, since  
their
       proper operation is crucial for the gaggle package.

    2) Now that I am using NAMESPACES, it seems I can't call
       these methods in gaggleTest.R unless they are explicitly  
exported from
       gaggle.R

    3) But if I do export them, then they (along with the .Rd files I  
would then
       need to create) would be visible to regular users; that seems
       like a bad idea.

Is there any other way to make these two functions available to the  
unitTest
program?  Anything, perhaps, like the C++ friend construct, or the Java
convention of allowing multiple classes in the same package access to  
otherwise-hidden
methods?

Thanks -

   Paul Shannon



More information about the Bioconductor mailing list