I have installed the xlsx package into my R, and I have verify that it is there. But when I try to open the library xlsx, it said that package or namespace load failed for xlsx.
This is a R version 3.6.0 and I am following a tutorial in https://www.tutorialspoint.com/r/r_excel_files.htm
> any(grepl("xlsx",installed.packages()))
[1] TRUE
> # Load the library into R workspace.
> library("xlsx")
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
According to the tutorial, the output should be
[1] TRUE
Loading required package: rJava
Loading required package: methods
Loading required package: xlsxjars