I am trying to load the rJava using the command:
library(rJava)
But I get the following error:
Error : .onLoad failed i
As mentioned in the r-statistics link cited above, you have to manually download the 64-bit version of Java. If not, then the 32-bit version will be installed.
So, if you have a 64-bit operating system, then ensure that both R and Java are using the 64-bit installs. Otherwise, this problem will persist.