Hello.
I have installed xlsx package but it's shows following eoror
library(xlsx)
Error: package or namespace load failed for ‘xlsx’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'C:/Users/Farhad/Documents/R/win-library/3.6/rJava/libs/i386/rJava.dll':
LoadLibrary failure: The specified module could not be found.
In addition: Warning message:
package ‘xlsx’ was built under R version 3.6.3
Can anyone help me ?
Welcome to the forum! It is looking for an installation of java which it cannot find.
Best way to address this:
Install Java
Re-install rJava
Try again to install xlsx. If it doesn't work you need to just change the directory so it is able to find the Java location.
(In the event of it not finding the location it will look something like this to set the directory:
Sys.setenv(JAVA_HOME="C:\\Program Files\\Java\\jre7") # for 64-bit version
Sys.setenv(JAVA_HOME="C:\\Program Files (x86)\\Java\\jre7") # for 32-bit version
library(rJava)