所以我试图运行
library(ggplot2)
library(qdap)
但是这个错误不断出现:
Unable to find any JVMs matching version "(null)".
No Java runtime present, try --request to install.
Error: package or namespace load failed for ‘qdap’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so, 6): Library not loaded: @rpath/libjvm.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so
Reason: image not found
In addition: Warning message:
running command '/usr/libexec/java_home' had status 1
我在Mac上的Rstudio中使用R,我已经搜索了很多类似的问题,但似乎都没有用。我很擅长使用R,任何帮助都会非常感谢。
我尝试使用
install.packages("openNLPdata")
这表明我觉得这是一件好事
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.4/openNLPdata_1.5.3-4.tgz'
Content type 'application/x-gzip' length 7323402 bytes (7.0 MB)
==================================================
downloaded 7.0 MB
The downloaded binary packages are in
/var/folders/h5/_5bjqp9j0g5gqr1794sw1xwh0000gn/T//RtmpaknsV6/downloaded_packages
但错误仍然存在。
提前致谢
答案 0 :(得分:1)
似乎该软件包可能需要运行rJava,这可能无法在您的环境中加载。尝试:
install.packages('rJava')
library('rJava')