我已经将xlsx软件包安装到我的R中,并且已经确认它已经存在。但是当我尝试打开库xlsx时,它说xlsx的包或名称空间加载失败。
这是R版本3.6.0,我正在按照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
根据教程,输出应为
[1] TRUE
Loading required package: rJava
Loading required package: methods
Loading required package: xlsxjars