[BioC] NAMESPACES, export, and unit tests

Kasper Daniel Hansen khansen at stat.Berkeley.EDU
Mon May 1 23:18:39 CEST 2006


And if you are starting to use namespaces you should really read the  
R-news article about namespaces (as far as I recall it was written by  
Luke Tierney).

/Kasper

On May 1, 2006, at 12:43 PM, Paul Shannon wrote:

> 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
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/ 
> gmane.science.biology.informatics.conductor



More information about the Bioconductor mailing list