问题
My package CTDesignExplorer uses shiny (and shinyIncubator). When I include
Depends: shiny
in the DESCRIPTION file, there are warnings upon loading the package in RStudio:
Warning in .simpleDuplicateClass(def, prev) : the specification for S3 class “AsIs” in package ‘RJSONIO’ seems equivalent to one from >package ‘BiocGenerics’ and is not turning on duplicate class definitions for this class
In command line R, loading shiny gets multiples warnings; in addition to "AsIs", with "connect", "file", "pipe", and "textConnection".
At https://github.com/joey711/phyloseq/issues/128, the issue is supposedly solved 6 months ago, but here it is, even after update.packages("RJSONIO"). Version is 1.0-3, from 2013-03-27.
At https://stat.ethz.ch/pipermail/bioc-devel/2013-March/004177.html, the suggestion was to remove RJSONIO from NAMESPACE. But it's not there (or in DESCRIPTION) in my package. In shiny, it's under Imports in DESCRIPTION.
This probably has no impact on code execution, but it's hard to be sure. Anyway, sure is ugly for my users to see.
回答1:
I think it might help to switch Shiny from Depends to Imports in your package. And, if necessary, use importFrom
in your NAMESPACE file to import specific Shiny functions, instead of bringing in all of Shiny.
http://cran.r-project.org/doc/manuals/R-exts.html#Specifying-imports-and-exports
来源:https://stackoverflow.com/questions/17181212/r-package-with-dependency-on-shiny-gives-rjsonio-warning