美文网首页
安装rjava in windows

安装rjava in windows

作者: 赵会成 | 来源:发表于2020-12-22 13:17 被阅读0次

    Installing rJava on Windows 10

    Struggled for about two hours to install rJava on my Windows 10 machine. Post here the steps that made it work in case anyone is interested (that is, future me).

    Check whether R is 32/64 bit with sessionInfo(). Check Platform.

    Download the specific 32/64 bit of Java. This is really important. R and Java must have the same memory signature, either 32 or 64 bit. I had 64 bit so I downloaded the Offline 64-bit version from here.

    Download Java JDK for 32/64 bit. For 64-bit I had to download the Windows version from here.

    If you installed 32-bit Java then everything should be saved in C:/Program Files (x86)/Java/. Conversely, if you installed 64-bit then everything should be installed in C:/Program Files/Java/.

    Install rJava with install.packages("rJava").

    Set your JAVA_HOME environment with Sys.setenv(JAVA_HOME="C:/Program Files/Java/jdk-10.0.1/") so that it points to your specific (64-bit in my case) folder that contains the jdk. Don’t worry about jdk-10.0.1 as this might change for future releases.

    library(rJava) throws no errors to me!

    Good luck!

    .rs.restartR()

    install.packages("C:/Users/Administrator/Desktop/glmulti_1.0.7.1.tar.gz", repos = NULL, type = "source")

    相关文章

      网友评论

          本文标题:安装rjava in windows

          本文链接:https://www.haomeiwen.com/subject/hbcsnktx.html