Solutions to the failure of R language loading rjava

library(rJava)

Error: when ‘rJava’ is calculated in loadNamespace(), onLoad failed.

call: inDL (x, as the logical (local), as the logical (now),…).

error: unable to load Shared object ‘f:/Program Files/R/R – 3.1.2/library/rJava/libs/x64/rJava DLL’ :

LoadLibrary failure: %1 is not a valid Win32 application.

Error: failed to load ‘rJava’ package or namespace,

The reason for the above error is that your JAVA version is 32-bit and your R is 64-bit, so download the 64-bit version of the JRE and change the environment variable JAVA_HOME to the position of the 64-bit JRE
The JRE can be downloaded in the website: http://www.java.com/en/download/manual.jsp

Read More: