[Bioc-devel] dbApply name collision, RMySQL and RPostgreSQL, no direct call to either
Hervé Pagès
hpages at fredhutch.org
Tue Apr 24 01:50:53 CEST 2018
Hi Paul,
trena imports RMySQL and RPostgreSQL. Both packages define and export
dbApply() so by importing all the symbols from both packages you get a
name clash. You can get around this by importing only the things you
need. It seems that you only call the following generic functions in
trena:
dbConnect
dbListTables
dbGetQuery
dbListConnections
dbDisconnect
These are S4 generic functions that are defined in the DBI package so
they should be imported from there. Also import the corresponding
methods defined in RMySQL and RPostgreSQL. Your NAMESPACE file will
look something like this:
importFrom(DBI,
dbConnect,
dbListTables,
dbGetQuery,
dbListConnections,
dbDisconnect)
importMethodsFrom(RMySQL,
dbConnect,
dbListTables,
dbGetQuery,
dbListConnections,
dbDisconnect)
importMethodsFrom(RPostgreSQL,
dbConnect,
dbListTables,
dbGetQuery,
dbListConnections,
dbDisconnect)
BTW have you considered using RMariaDB instead of RMySQL?
https://cran.r-project.org/web/packages/RMariaDB/
Cheers,
H.
On 04/23/2018 11:12 AM, Paul Shannon wrote:
>
> Warning: replacing previous import ‘RMySQL::dbApply’ by ‘RPostgreSQL::dbApply’ when loading ‘trena’
>
> We do not call dbApply directly anywhere in the package. I imagine it is called routinely by functions that we do call.
>
> Any suggestions on how to clear this warning?
>
> Thanks.
>
> - Paul
>
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_bioc-2Ddevel&d=DwIFaQ&c=eRAMFD45gAfqt84VtBcfhQ&r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=MeyA9WrkJOQDYGySOlgR8QARzH-hSAPwc5-b4mJ5E9A&s=njLygKe4nxHzP911sM3TIgYMkMHsNWR97p3ZFIr0Voc&e=
>
--
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
More information about the Bioc-devel
mailing list