0
votes

XLSX package is not loading in WIndows 7 with Rstudio 3.5.3

Error: package or namespace load failed for ‘xlsx’: .onLoad failed in loadNamespace() for 'rJava', details: call: fun(libname, pkgname) error: JAVA_HOME cannot be determined from the Registry

1
RStudio is merely an IDE and plays little to no role in how packages are handled. Have you installed and configured java (e.g. see here)?Roman Luštrik

1 Answers

0
votes

This error is likely resolved by installing a Java version (e.g. 64-bit Java or 32-bit Java) that corresponds to the type of R version that you are using (e.g. 64-bit R or 32-bit R).

# check which version of R you are running
Sys.getenv("R_ARCH")

# check which version of Java is being utilized by R
system("java -version")

If you need a different version of Java then you'll need to manually download and install the right version from here. Don't forget to restart R and your browser after you install Java.