Error package or namespace load failed for ‘xlsx’ loadNamespace里算rJava时onLoad失败了详细内容: 调用 funlibname pkgname 错误 JAVA_HOME cannot be determined from the RegistryIn addition Warning message程辑包‘xlsx’是用R
This error message suggests that the 'xlsx' package failed to load because it requires the 'rJava' package, which also failed to load due to an error in the 'onLoad' function. The specific error message indicates that the JAVA_HOME environment variable could not be determined from the Windows Registry.
One potential solution is to set the JAVA_HOME variable manually in your system environment variables. To do this, go to Control Panel > System and Security > System > Advanced system settings > Environment Variables, and add a new system variable called JAVA_HOME with the path to your Java installation, e.g. "C:\Program Files\Java\jre1.8.0_301".
Another possible solution is to reinstall both the 'rJava' and 'xlsx' packages using the latest version of R (currently 4.1.1). The warning message about the package being built with R version 4.2.3 is not necessarily a problem, but it may indicate that the package was not tested thoroughly with earlier versions of R.
原文地址: https://www.cveoy.top/t/topic/IPU 著作权归作者所有。请勿转载和采集!