From hpages at fredhutch.org  Sun Jun 26 22:21:00 2016
From: hpages at fredhutch.org (=?UTF-8?B?SGVydsOpIFBhZ8Oocw==?=)
Date: Sun, 26 Jun 2016 13:21:00 -0700
Subject: [Rd] 3 minor issues with getClass 'resolve.msg' arg
Message-ID: <5770392C.8090809@fredhutch.org>

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 at fredhutch.org
Phone:  (206) 667-5791
Fax:    (206) 667-1319



[Rd] 3 minor issues with getClass 'resolve.msg' arg
=?UTF-8?B?SGVydsOpIFBhZ8Oocw==?=