程序包在启动时不会加载rChoiceDialogs

问题描述

我正在编写一个使用rChoiceDialogs进行文件和目录选择的程序包。我已经在NAMESPACE中导入了rChoiceDialogs和rJava(通过roxygen和document())。

运行程序包时,它将引发此错误:

Error in .jcall("java/lang/Class","Ljava/lang/Class;","forName",cl,: 
  No running JVM detected. Maybe .jinit() would help.
Error in h(simpleError(msg,call)) : 
  error in evaluating the argument 'Class' in selecting a method for function 'new': No running JVM detected. Maybe .jinit() would help.

如果我随后手动加载rChoiceDialogs,则会得到:

Loading required package: rJava
This is rChoiceDialogs 1.0.6 2014-09-05

,该程序包完美运行。有趣的是,如果我尝试卸载rChoiceDialogs,则会得到:

Warning message:
‘rChoiceDialogs’ namespace cannot be unloaded:
  namespace ‘rChoiceDialogs’ is imported by ‘myPackage’ so cannot be unloaded

我尝试将rChoiceDialogs和rJava放在Depends中的不同组合,但是check()抱怨应该将它们导入。

我还尝试使用以下代码直接在代码中调用其函数:

dataName <- rChoiceDialogs::rchoose.files("Select source file",multi=FALSE)

但是这似乎也不起作用。我没主意了。我想念什么?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...