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'm using R version 2.15.1 on Ubuntu.) Thanks, Paul
RMySQL and RPostgreSQL interaction
9 messages · Paul Gilbert, Spencer Graves, Sébastien Bihorel +2 more
On 9/18/2012 8:40 AM, Paul Gilbert 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.
If someone else identifies your problem, great. Otherwise, have
you tried creating a toy package containing only the minimum? If you get
that to work, then I'd create a second toy package starting as a full
copy of your existing package, then start throwing things out until you
find the problem. I know that's a lot of work, but if you use a manual
binary search technique (discard roughly half of the package at each
step -- or discard first the 90% you think is least likely to contain
the problem), it could go fairly fast. If you do it on R-Forge, then
it's easy to give others access to your toy examples.
I hope someone else helps you fix this without the route I
suggested. If not, I hope this helps. Spencer
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'm using R version 2.15.1 on Ubuntu.) Thanks, Paul
_______________________________________________ R-sig-DB mailing list -- R Special Interest Group R-sig-DB at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-db
Spencer Graves, PE, PhD President and Chief Technology Officer Structure Inspection and Monitoring, Inc. 751 Emerson Ct. San Jos?, CA 95126 ph: 408-655-4567 web: www.structuremonitoring.com
On Tue, 18 Sep 2012 11:40:26 -0400,
Paul Gilbert <pgilbert902 at 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.
Seb
On 12-09-18 01:30 PM, Sebastian P. Luque wrote:
On Tue, 18 Sep 2012 11:40:26 -0400, Paul Gilbert <pgilbert902 at 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. Paul
On 9/18/2012 10:46 AM, Paul Gilbert wrote:
On 12-09-18 01:30 PM, Sebastian P. Luque wrote:
On Tue, 18 Sep 2012 11:40:26 -0400, Paul Gilbert <pgilbert902 at 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.
CRAN policy, at least as of August 30, 2012, was to reject
packages that generate either Warnings or Notes. Thus, "just a warning"
is a show-stopper if you plan to submit the package to CRAN. There is
now a "CRAN" function in the development version of "fda" on R-Forge
that we use to reduce the test time with "R CMD check --as-cran". There
was as thread on the R-Devel list, subject: "if(--as-cran)?", which I
thought mentioned a similar function in a development version of R.
Unfortunately, I can't find it now.
Spencer
Paul
_______________________________________________ R-sig-DB mailing list -- R Special Interest Group R-sig-DB at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-db
Spencer Graves, PE, PhD President and Chief Technology Officer Structure Inspection and Monitoring, Inc. 751 Emerson Ct. San Jos?, CA 95126 ph: 408-655-4567 web: www.structuremonitoring.com
On Tue, 18 Sep 2012 13:46:06 -0400,
Paul Gilbert <pgilbert902 at 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 at 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...
Seb
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 at 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 at 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...
Hi, It is a pity that such interference between different database driver happens. We can exclude export of dbObjectId from RPostgreSQL, but I reallized that would cause a warning on TSPostgreSQL. One of the possible solution may moving the definition of db* to DBI and exclude from individual database drivers. Other routines that may be imported to DBI includes dbBeginTransaction(), now deleted from RPostgreSQL, but some request are coming. DBI is last published on 2009-12-22, but not changed thereafter. http://cran.r-project.org/web/packages/DBI/index.html Author: R Special Interest Group on Databases (R-SIG-DB) So, it appears the DBI can be updated based on discussion on this mailing-list. But I do not know how do we make agreement and update. Best regards,
On 2012/09/19, at 0:40, Paul Gilbert 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'm using R version 2.15.1 on Ubuntu.) Thanks, Paul
_______________________________________________ R-sig-DB mailing list -- R Special Interest Group R-sig-DB at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-db
On 19/09/2012 03:33, NISHIYAMA Tomoaki wrote:
Hi, It is a pity that such interference between different database driver happens. We can exclude export of dbObjectId from RPostgreSQL, but I reallized that would cause a warning on TSPostgreSQL. One of the possible solution may moving the definition of db* to DBI and exclude from individual database drivers. Other routines that may be imported to DBI includes dbBeginTransaction(), now deleted from RPostgreSQL, but some request are coming. DBI is last published on 2009-12-22, but not changed thereafter. http://cran.r-project.org/web/packages/DBI/index.html Author: R Special Interest Group on Databases (R-SIG-DB) So, it appears the DBI can be updated based on discussion on this mailing-list. But I do not know how do we make agreement and update.
Not so: CRAN packages can only be updated by their maintainer (Cc:ed here). If David James does not want to update DBI, he maybe could be persuaded to hand over the maintainership.
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595