From pgilbert902 at gmail.com  Wed Sep 19 01:56:23 2012
From: pgilbert902 at gmail.com (Paul Gilbert)
Date: Tue, 18 Sep 2012 19:56:23 -0400
Subject: [Rd] problem with vignettes when S4 classes in packages overlap
In-Reply-To: <50590283.4030700@gmail.com>
References: <5058EA54.8050305@gmail.com> <50590283.4030700@gmail.com>
Message-ID: <50590A27.8010709@gmail.com>



On 12-09-18 07:23 PM, Duncan Murdoch wrote:
> On 12-09-18 5:40 PM, Paul Gilbert wrote:
>>
>> ( A similar problem is also reported by Sebastian P. Luque with
>>     library(maptools)
>>     library(trip)
>> in the vignette as below ).
>>
>> I am writing a vignette which loads RMySQL and RPostgreSQL. This
>> produces the warning:
>>
>> Loading required package: DBI
>> Warning in .simpleDuplicateClass(def, prev) :
>>     A specification for class ?dbObjectId? in package ?RPostgreSQL? seems
>> equivalent to one from package ?RMySQL? and is not turning on duplicate
>> class definitions for this class
>>
>> This can be reproduced by running
>>     R CMD Sweave --pdf Atest.Stex
>>
>> where the file Atest.Stex has the lines
>>
>> \documentclass{article}
>> \usepackage{Sweave}
>> \begin{document}
>> \begin{Scode}
>> library("RMySQL")
>> library("RPostgreSQL")
>> \end{Scode}
>> \end{document}
>>
>> These warnings only happen in a vignette. They are not produced if the
>> lines are entered in an R session.
>>
>> (Using R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows" on Ubunt
>
> You'll get the warning in a regular session if you set options(warn=1).
>   I think Sweave is probably doing this so that warnings show up around
> the time of the chunk they correspond to.  It does it in the command
> line version, but not in the Sweave() function (which would save them up
> to the end).
>
> I don't know if the warning is something you should worry about or not.

It doesn't interfere with producing the vignette, but for submitting to 
CRAN it is better not to have warnings coming from my package, even 
though they are caused by a problem with other packages. Now that I know 
why it only happens in the vignette, I guess I can suppress it (but it 
would be nice to see the other packages fixed).

Thanks,
Paul
>
> Duncan Murdoch



[Rd] problem with vignettes when S4 classes in packages overlap
Paul Gilbert