Skip to content
Prev 7260 / 21312 Next

[Bioc-devel] issue about S4 slot has a dist object.

On 04/01/2015 03:52 PM, Herv? Pag?s wrote:
This sounds like an ok work-around to me.

For the hard-core...

One thing is that this is not seen when the package is loaded by itself, e.g.,

 > biocLite("zhilongjia/cogena")
 > library(cogena)
 >

only when loaded by BiocCheck (on the source directory)

 > BiocCheck::BiocCheck("cogena")
* This is BiocCheck, version 1.3.13.
* BiocCheck is a work in progress. Output and severity of issues may
   change.
* Installing package...
Note: the specification for S3 class "dist" in package 'cogena' seems equivalent 
to one from package 'graph': not turning on duplicate class definitions for this 
class.
^C

This is because BiocCheck (indirectly?) Imports: graph. But the old class 
definition seems to 'leak' (even though graph is not on the search path, and the 
dist old class is not exported from graph, and BiocCheck doesn't import the 
non-exported dist class, and cogena doesn't Depend or Import graph!)

Also of interest perhaps is that the Note is only printed when warn=1 (which 
BiocCheck also uses)

(new R session)

 > requireNamespace("graph")
Loading required namespace: graph
 > requireNamespace("cogena")
Loading required namespace: cogena
 > q()

(new R session:)

 > options(warn=1)
 > requireNamespace("graph")
Loading required namespace: graph
 > requireNamespace("cogena")
Loading required namespace: cogena
Note: the specification for S3 class "dist" in package 'cogena' seems equivalent 
to one from package 'graph': not turning on duplicate class definitions for this 
class.
 >