问题描述
我需要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 (将#修改为@)