R package with dependency on shiny gives RJSONIO warning

会有一股神秘感。 提交于 2019-12-13 14:05:27

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!