Reputation: 1
I keep getting the same error, for both first for XLConnect, (which I thought was a java problem) and now rJava (which is also not working). This is the error message I get when I library(rJava):
Error: package or namespace load failed for ‘rJava’: .onLoad failed in loadNamespace() for 'rJava', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared object '/Users/snyderk2/Library/R/3.4/library/rJava/libs/rJava.so':
dlopen(/Users/snyderk2/Library/R/3.4/library/rJava/libs/rJava.so, 6): Library not loaded: @rpath/libjvm.dylib Referenced from: /Users/snyderk2/Library/R/3.4/library/rJava/libs/rJava.so Reason: image not found
I am new to R, and just need to figure out how to get these packages working, thanks!
Upvotes: 0
Views: 110
Reputation: 4551
Another R package for working with excel data which does not require rJava is openxlsx. I've found it works faster than java-based packages, which is a nice bonus.
Upvotes: 0
Reputation: 384
Try (check your java version and change accordingly):
Sys.setenv(JAVA_HOME = "C:/Program Files/Java/jre-9.0.1")
And then load library.
Install package xlsx
if you are trying to access Excel file by entering install.packages("xlsx", dependencies = T)
in your console.
Upvotes: 0