[R-sig-DB] RMySQL and RPostgreSQL interaction

Paul Gilbert pg||bert902 @end|ng |rom gm@||@com
Tue Sep 18 23:04:01 CEST 2012


So it has to do with Sweave. Following Sebastian's model, This vignette 
produces the warning

\documentclass{article}
\usepackage{Sweave}
\begin{document}
\begin{Scode}
library("RMySQL")
library("RPostgreSQL")
\end{Scode}
\end{document}

but running the those lines in an R session does not. I think I will 
re-phrase the issue and move it to R-devel.

Paul


On 12-09-18 02:58 PM, Sebastian P. Luque wrote:
> On Tue, 18 Sep 2012 13:46:06 -0400,
> Paul Gilbert <pgilbert902 using gmail.com> wrote:
>
>> On 12-09-18 01:30 PM, Sebastian P. Luque wrote:
>>> On Tue, 18 Sep 2012 11:40:26 -0400,
>>> Paul Gilbert <pgilbert902 using gmail.com> wrote:
>
>>>> I am doing some comparison for which I load both RMySQL and
>>>> RPostgreSQL from my own packages TSMySQL and TSPostgreSQL and I am
>>>> getting the following warning building a vignette. I think with
>>>> package namespaces / S4 definitions it is a bit difficult to
>>>> generate a self contained example, at least I have not yet managed
>>>> to do that, but I would appreciate any suggestions about what needs
>>>> to be done.
>
>>>> Loading required package: TSPostgreSQL Loading required package:
>>>> RPostgreSQL 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
>
>>> I've seen this with a vignette using both the maptools and trip
>>> packages, but it was just a warning and the vignette built just fine.
>
>> Yes, it is just a warning, and the vignette builds fine. It also looks
>> like there is probably a simple fix to remove the problem that causes
>> the warning, since that is what the warning suggests. However, as
>> Spencer pointed out, isolating a simple example is not so easy.
>
> I had actually built such an example with those packages (available from
> CRAN):
>
> ---<--------------------cut here---------------start------------------->---
> \documentclass{article}
> \usepackage{Sweave}
>
> \begin{document}
>
> <<load-packages>>=
> library(maptools)
> library(trip)
>
> @
>
> \end{document}
> ---<--------------------cut here---------------end--------------------->---
>
> which produces the warnings:
>
> ---<--------------------cut here---------------start------------------->---
>      Warning in .simpleDuplicateClass(def, prev) :
>       A specification for class “owin” in package ‘trip’ seems equivalent to one from package ‘maptools’ and is not turning on duplicate class definitions for this class
>      Warning in .simpleDuplicateClass(def, prev) :
>       A specification for class “ppp” in package ‘trip’ seems equivalent to one from package ‘maptools’ and is not turning on duplicate class definitions for this class
>      Warning in .simpleDuplicateClass(def, prev) :
>       A specification for class “psp” in package ‘trip’ seems equivalent to one from package ‘maptools’ and is not turning on duplicate class definitions for this class
> ---<--------------------cut here---------------end--------------------->---
>
> Both packages have the same definitions for these classes.  A quick
> search on this warning points to
> https://stat.ethz.ch/pipermail/r-devel/2011-July/061628.html, which
> suggests that adding an importClassesFrom() directive in NAMESPACE and
> removing the class definition from one of the packages, might solve
> this.  A dependency may be needed though...
>




More information about the R-sig-DB mailing list