如何解决ReporteRs :: docx;错误.onLoad函数失败,包'rJava'的'loadNamespace'
我需要ReporteRs
和rJava
软件包的帮助。我知道我应该考虑使用officer
软件包,但是我从使用ReporteRs
的队友那里收到了一个大脚本。
这是我尝试使用ReporteRs软件包时收到的错误:
> Doc <- ReporteRs::docx(title = "OutputName")
Error in .jnew(class.docx4r.document) :
java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
In addition: Warning message:
Function docx is deprecated,please use officer::read_docx() instead.
我一直在寻找解决方案,并且知道ReporteRs
需要适当的Java版本-因此我安装了jre-8u172(windows-x64)并重新启动了R会话。然后,通过以下行:JAVA-PATH
向新安装的JRE指示变量Sys.setenv(JAVA_HOME="C:/Program Files/Java/jre1.8.0_172/bin")
。不幸的是,当我想再次使用ReporteRs软件包时,收到以下错误:
> Doc <- ReporteRs::docx(title = "OutputName")
Error: .onLoad failed 'loadNamespace()' for 'rJava',details:
call: inDL(x,as.logical(local),as.logical(now),...)
error: unable to load shared object 'C:/Users/jacob/Documents/R/R-3.6.3/library/rJava/libs/x64/rJava.dll':
LoadLibrary failure: The specified module could not be found.
我也在寻找该错误的解决方案,我发现this,他们建议确保我安装了适合我的R环境(32或64位)的Java。我的R是64位,Java也是64位。 我的ReporteRs版本是0.8.11.001,rJava版本是0.9-12。
有人可以帮我吗?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。