[Bioc-devel] Warning in .simpleDuplicateClass(def, prev)

Dan Tenenbaum dtenenba at fhcrc.org
Tue Mar 19 15:31:10 CET 2013


On Tue, Mar 19, 2013 at 12:59 AM, Stefanie Tauber
<stefanie.tauber at univie.ac.at> wrote:
>
> On Mo, 18.03.2013, 17:39, Dan Tenenbaum wrote:
>> On Mon, Mar 18, 2013 at 5:39 AM, Stefanie Tauber
>> <stefanie.tauber at univie.ac.at> wrote:
>>> Hi,
>>>
>>> I am currently working on new BioC package.
>>> R CMD build, check and INSTALL are successfully passed.
>>> I just always get the following warning (when installing the package):
>>>
>>> Warning in .simpleDuplicateClass(def, prev) :
>>>   the specification for S3 class “AsIs” in package ‘RJSONIO’ seems
>>> equivalent to one from package ‘BiocGenerics’ and is not turning on
>>> duplicate class definitions for this class
>>>
>>> Here are the relevant slots from my Description file:
>>>
>>> Depends: R (>= 2.15.3), BiocGenerics, ggplot2, gridSVG (>= 1.0-0)
>>> Imports: BiocGenerics, gridSVG, gridExtra, GenomicRanges,
>>> GenomicFeatures,
>>> biomaRt, knitr, fractaldim, xtable, IRanges
>>>
>>> And my Namespace File:
>>>
>>> import(BiocGenerics)
>>> import(ggplot2)
>>> import(gridSVG)
>>> import(gridExtra)
>>> import(GenomicRanges)
>>> import(GenomicFeatures)
>>> import(biomaRt)
>>> import(knitr)
>>> import(fractaldim)
>>> import(xtable)
>>> import(IRanges)
>>>
>>>
>>> This is my SessionInfo when loading my package:
>>>> sessionInfo()
>>> R Under development (unstable) (2013-02-27 r62087)
>>> Platform: x86_64-unknown-linux-gnu (64-bit)
>>>
>>> locale:
>>>  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
>>>  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
>>>  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
>>>  [7] LC_PAPER=C                 LC_NAME=C
>>>  [9] LC_ADDRESS=C               LC_TELEPHONE=C
>>> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>>>
>>> attached base packages:
>>> [1] grid      parallel  stats     graphics  grDevices utils     datasets
>>> [8] methods   base
>>>
>>> other attached packages:
>>> [1] fractalQC_0.99     gridSVG_1.0-0      XML_3.95-0.2
>>> RJSONIO_1.0-1
>>> [5] ggplot2_0.9.3.1    BiocGenerics_0.5.6
>>>
>>> loaded via a namespace (and not attached):
>>>  [1] AnnotationDbi_1.21.16   Biobase_2.19.3          biomaRt_2.15.1
>>>  [4] Biostrings_2.27.11      bitops_1.0-5            BSgenome_1.27.1
>>>  [7] colorspace_1.2-1        DBI_0.2-5               dichromat_2.0-0
>>> [10] digest_0.6.3            evaluate_0.4.3          formatR_0.7
>>> [13] fractaldim_0.8-1        GenomicFeatures_1.11.16
>>> GenomicRanges_1.11.38
>>> [16] gridExtra_0.9.1         gtable_0.1.2            IRanges_1.17.37
>>> [19] knitr_1.1               labeling_0.1            MASS_7.3-24
>>> [22] munsell_0.4             plyr_1.8                proto_0.3-10
>>> [25] RColorBrewer_1.0-5      RCurl_1.95-4.1          reshape2_1.2.2
>>> [28] Rsamtools_1.11.25       RSQLite_0.11.2          rtracklayer_1.19.11
>>> [31] scales_0.2.3            stats4_3.0.0            stringr_0.6.2
>>> [34] tools_3.0.0             xtable_1.7-1            zlibbioc_1.5.0
>>>
>>>
>>> What can I do so that the warning gets resolved?
>>
>> You could put RJSONIO and BiocGenerics in Depends even though you
>> don't depend directly on RJSONIO (and you can remove BiocGenerics from
>> Imports and NAMESPACE).
>>
>> This is caused by the fact that RJSONIO and BiocGenerics use
>> setOldClass on the same 'old' S3 classes; The behavior is probably a
>> bug in R.
>>
>> Dan
>>
>>
>>>
>>> Best,
>>> Stefanie
>>>
>>> _______________________________________________
>>> Bioc-devel at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>>
>
> Hi,
>
> Thanks for your help, I changed my description and namespace file
> accordingly.
>
> DESCRIPTION File:
> Depends: R (>= 2.15.3), BiocGenerics, RJSONIO, ggplot2, gridSVG (>= 1.0-0)
> Imports: gridExtra, GenomicRanges, GenomicFeatures, biomaRt, knitr,
> fractaldim, xtable, IRanges
>
> Namespace File:
> import(RJSONIO)
> import(ggplot2)
> import(gridSVG)
> import(gridExtra)
> import(GenomicRanges)
> import(GenomicFeatures)
> import(biomaRt)
> import(knitr)
> import(fractaldim)
> import(xtable)
> import(IRanges)
>
>
> Still, I get the same warning:
> Warning in .simpleDuplicateClass(def, prev) :
>   the specification for S3 class “AsIs” in package ‘RJSONIO’ seems
> equivalent to one from package ‘BiocGenerics’ and is not turning on
> duplicate class definitions for this class
>
>
> I mean, everything is working fine. I just would prefer a clean
> installation procedure...
>


Try removing
import(RJSONIO)
from NAMESPACE.

Dan

> Best,
> Stefanie
>



More information about the Bioc-devel mailing list