天道酬勤,学无止境

rjava

在 Windows 上设置 Java R 接口 (JRI)(Setting up Java R Interface (JRI) on Windows)

问题 我遵循了网络上的指南并查看了有关 stackoverflow 的问题,但我仍然无法在 Windows 上设置 JRI。 以下是我采取的步骤: 1) 安装 R 2) 在 R 中执行install.packages("rJava")来安装 rJava 3) 创建一个值为C:\Program Files\R\R-3.1.2的R_HOME系统变量 4) 将以下内容添加到我的PATH变量中: C:\Program Files\R\R-3.1.2\bin\x64;C:\Users\USERNAME\Documents\R\win-library\3.1\rJava\jri\x64 5) 添加 JRI.jar(位于C:\Users\USERNAME\Documents\R\win-library\3.1\rJava\jri )作为 IntelliJ 中的依赖项 6)将IntelliJ中的VM选项设置为-Djava.library.path=C:\Users\USERNAME\Documents\R\win-library\3.1\rJava\jri\x64 7) 启动 R 并执行library("rJava") 8)运行我的程序来测试是否一切都设置好了 得到以下错误: # # A fatal error has been detected by the Java Runtime

2021-11-29 03:34:40    分类:技术分享    java   r   rjava   jri

无法在 R 中安装 library(xlsx) 并寻找替代方案(Cannot install library(xlsx) in R and look for an alternative)

问题 我使用 R 版本 3.0.3。 我无法安装库(xlsx)。 错误信息: Loading required package: rJava Error : .onLoad failed in loadNamespace() for 'rJava', details: call: inDL(x, as.logical(local), as.logical(now), ...) error: unable to load shared object 'C:/Program Files/R/R-3.0.3/library/rJava/libs/x64/rJava.dll': LoadLibrary failure: The specified module could not be found. 然后我尝试自己安装rjava 。 收到以下错误消息: library("rJava", lib.loc="C:/Program Files/R/R-3.0.3/library") 错误:'rJava' 的 loadNamespace() 中的 .onLoad 失败,详细信息:调用:inDL(x, as.logical(local), as.logical(now), ...) 错误:无法加载共享对象'C:/Program Files/R/R-3.0.3/library/rJava/libs

2021-11-28 06:12:00    分类:技术分享    r   xlsx   rjava

在 AWS EC2 实例上安装 rJava 包(Install rJava package on AWS EC2 instance)

问题 我在 AWS EC2 实例上使用 R。 我正在尝试使用“mailR”包发送邮件。 有人告诉我,要安装该软件包,我应该事先安装软件包“rJava”,因为“mailR”取决于它。 尝试安装“rJava”时出现此错误: gcc:错误:libgomp.spec:没有那个文件或目录 快速搜索后,我在此链接上看到了一篇解释此内容的帖子: “您必须确保您的 GCC 启用了 OpenMP 支持。确保在安装时从可选包中选择 OpenMP。” 我真的不知道该怎么做。 应该在 install.packages("rJava") 的参数中添加一些东西吗? 非常感谢您的帮助! M。 回答1 在这里找到了解决方案 我确实安装了 gcc,但显然我们不应该安装最新版本,所以按照链接帖子中的建议,我下载了版本 4 并且它可以工作。 你可以通过输入 Putty 来做到这一点: sudo yum install gcc-4.8.5 谢谢 !

2021-11-24 11:24:09    分类:技术分享    r   amazon-web-services   rjava   sendmailr

已安装 rJava,已安装 Java 8 更新。 仍然无法在 MacOS Sierra 上加载 rJava(Installed rJava, Installed Java 8 update. Still cannot load rJava on MacOS Sierra)

问题 请记住,我是计算机文盲并且是 R 新手。我已经在 R studio 版本 1.0.143 中安装了 rJava 包并安装了 Java 8(使用 MacOS Sierra)。 当我尝试加载 rJava 包时: library(rJava) 我收到以下错误 Unable to find any JVMs matching version "(null)". No Java runtime present, try --request to install. Error: package or namespace load failed for ‘rJava’: .onLoad failed in loadNamespace() for 'rJava', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared object '/Users/cormac/Library/R/3.4/library/rJava/libs/rJava.so': dlopen(/Users/cormac/Library/R/3.4/library/rJava/libs/rJava.so, 6): Library not loaded: @rpath/libjvm.dylib Referenced

2021-11-23 05:12:01    分类:技术分享    r   rjava

RMongo installation fails with Segmentation Fault in Ubuntu

I've been for last couple of hours trying to install the RMongo package with the following output: > install.packages("RMongo") Installing package into ‘/usr/local/lib/R/site-library’ (as ‘lib’ is unspecified) --- Please select a CRAN mirror for use in this session --- trying URL 'https://repo.bppt.go.id/cran/src/contrib/RMongo_0.0.25.tar.gz' Content type 'application/x-gzip' length 4169519 bytes (4.0 MB) ================================================== downloaded 4.0 MB * installing *source* package ‘RMongo’ ... ** package ‘RMongo’ successfully unpacked and MD5 sums checked ** R ** inst **

2021-11-22 12:55:48    分类:问答    r   ubuntu   linux-kernel   segmentation-fault   rjava

Setting up Java R Interface (JRI) on Windows

I have followed guides on the web and looked at questions on stackoverflow but I am still not able to set up JRI on Windows. Here are the steps I have taken: 1) Install R 2) Execute install.packages("rJava") in R to install rJava 3) Create a R_HOME system variable with value C:\Program Files\R\R-3.1.2 4) Add the following to my PATH variable: C:\Program Files\R\R-3.1.2\bin\x64;C:\Users\USERNAME\Documents\R\win-library\3.1\rJava\jri\x64 5) Added the JRI.jar (located in C:\Users\USERNAME\Documents\R\win-library\3.1\rJava\jri) as a dependency in IntelliJ 6) Set the VM options in IntelliJ to

2021-11-20 04:50:24    分类:问答    java   r   rjava   jri

Frustration using rJava to call a third party Java jar

I'm trying to use R to hook the Java code from the GSRad project. The GSRad Java code is available online and comes as a One-Jar project jar (I was not familiar with One-Jar until today). I can run the One-Jar file just dandy using the following command (after unzipping the file from the above link): java -jar gsrad_sample.jar When I pop open the gsrad_sample.jar file I see a jar titled clima_GSRAD-1.0.0.jar in the /lib/ directory which contains the class files I want to hook with R. I've pulled out the jar of my affection and tried the following, to no avail: library(rJava) .jinit()

2021-11-20 01:18:14    分类:问答    r   rjava

Error: package or namespace load failed for ‘rJava’

So I have tried the previously proposed answer to my question. but I am still having the same error message: I am trying to load the rJava library in R library(rJava) Error : .onLoad failed in loadNamespace() for 'rJava', details: call: inDL(x, as.logical(local), as.logical(now), ...) error: unable to load shared object 'C:/Users/Lauriane/Documents/R/win-library/3.3/rJava/libs/x64/rJava.dll': LoadLibrary failure: The specified module could not be found. Error: package or namespace load failed for ‘rJava’ Please help, Thanks

2021-11-19 10:40:07    分类:问答    r   rjava

无法在 ubuntu 系统上安装 rJava(Can't install rJava on ubuntu system)

问题 我看过一些与此相关的帖子......但我看到的所有建议的解决方案似乎都不起作用......我在 EC2 实例中运行 R 并运行以下命令来尝试安装 rJava 但无济于事...任何帮助将不胜感激。 > install.packages("rJava") Installing package(s) into ‘/home/ubuntu/R/library’ (as ‘lib’ is unspecified) trying URL 'http://cran.stat.nus.edu.sg/src/contrib/rJava_0.9-3.tar.gz' Content type 'application/x-gzip' length 537153 bytes (524 Kb) opened URL ================================================== downloaded 524 Kb * installing *source* package ‘rJava’ ... ** package ‘rJava’ successfully unpacked and MD5 sums checked checking for gcc... gcc -std=gnu99 checking for C compiler default output

2021-11-18 19:56:15    分类:技术分享    java   r   ubuntu   rjava

Cannot install library(xlsx) in R and look for an alternative

I use R version 3.0.3. I was not able to install library(xlsx). Error message: Loading required package: rJava Error : .onLoad failed in loadNamespace() for 'rJava', details: call: inDL(x, as.logical(local), as.logical(now), ...) error: unable to load shared object 'C:/Program Files/R/R-3.0.3/library/rJava/libs/x64/rJava.dll': LoadLibrary failure: The specified module could not be found. I then tried to install rjava on its own. Got the error message below: library("rJava", lib.loc="C:/Program Files/R/R-3.0.3/library") Error : .onLoad failed in loadNamespace() for 'rJava', details: call: inDL

2021-11-18 16:55:06    分类:问答    r   xlsx   rjava