rJava install error “JAVA_HOME cannot be determined from the Registry”
I am trying to load the rJava using the command: library(rJava) But I get the following error: Error : .onLoad failed in loadNamespace() for 'rJava', details: call: fun(libname, pkgname) error: JAVA_HOME cannot be determined from the Registry Error: package or namespace load failed for ‘rJava’ I tried reinstalling both the Java and the R program with the latest versions but still get these errors.. May I know how I can resolve this? Thank you very much! This error is often resolved by installing a Java version (i.e. 64-bit Java or 32-bit Java) that fits to the type of R version that you are