[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-devel
Subject:    [Rd] 3 minor issues with getClass 'resolve.msg' arg
From:       Hervé Pagès <hpages () fredhutch ! org>
Date:       2016-06-26 20:21:00
Message-ID: 5770392C.8090809 () fredhutch ! org
[Download RAW message or body]

Hi,

It turns out that two packages (1 Bioconductor, 1 CRAN) define an
S4 class called "Annotated":

   library(S4Vectors)  # see (*) at bottom for how to install
   library(RNeXML)

1st issue
---------

getClass() issues the same warning twice:

   tmp <- getClass("Annotated")
   Found more than one class "Annotated" in cache; using the first, from 
namespace 'S4Vectors'
   Found more than one class "Annotated" in cache; using the first, from 
namespace 'S4Vectors'

2nd issue
---------

It would be very helpful if the warning message was giving the name of
the other package. I was in a session with 50+ packages attached or
loaded via a namespace when I saw the warning. Took me a while to
identify the other package, which I finally managed to do with:

   names(.Call(methods:::C_R_getClassFromCache, "Annotated", 
methods:::.classTable))

3rd issue
---------

Calling getClass() with 'resolve.msg=FALSE' only removes one of the 2
warnings:

   > tmp <- getClass("Annotated", resolve.msg=FALSE)
   Found more than one class "Annotated" in cache; using the first, from 
namespace 'S4Vectors'

Thanks,
H.

(*) Install S4Vectors with:

   source("https://bioconductor.org/biocLite.R")
   biocLite("S4Vectors")

-- 
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpages@fredhutch.org
Phone:  (206) 667-5791
Fax:    (206) 667-1319

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic