Questions tagged [rjava]

rJava is an interface between R and Java.

rJava is an R package providing interfaces between R and Java. As a package rJava allows R code to instantiate a Java VM, create Java objects and call Java methods. It also includes JRI (Java/R Interface) which conversely embeds R into a Java application.

613 questions
0
votes
1 answer

rJava: Creating zero-length Java arrays from R

I am looking for the rJava equivalent of: String[] s; s= new String[0]; I tried: library(rJava) .jinit() s=.jarray(list(NULL), "[Ljava/lang/String;") But when passing it to a method expecting a String[] with jcall(..., s), rJava raises an…
antonio
  • 10,629
  • 13
  • 68
  • 136
0
votes
1 answer

rJava installation on mac, incompatible library version?

i'm trying to install rJava on my mac but i get the following message, do you know what it means? Reason: Incompatible library version: rJava.so requires version 3.4.0 or later, but libR.dylib provides version 3.2.0 How can i resolve it in an easy…
user6579764
0
votes
1 answer

How to build a jar without the r.java?

We can't put resource ids (R.java) directly in a jar file. If we do there is no way to guarantee they will be unique. But how to compile the jar without the R.java ? in my code I do often call like R.style.xxx to obtain the id of xxx but if I don't…
user7905708
0
votes
1 answer

rJava - method with signature not found

My problem is similar to this one : Even with adding the semicolon didn't work for me this is my method when i call .jmethod to display it for me : [10] "public java.util.Set utils.Rinterface.getPhones()" when I call the method, Like this…
0
votes
0 answers

rJava installation error mac

trying to load "xlsx" package but getting the same error again and again with dependency "rJava" library(rJava) Error: package or namespace load failed for ‘rJava’: .onLoad failed in loadNamespace() for 'rJava', details: call: dyn.load(file,…
smishra
  • 13
  • 3
0
votes
2 answers

error installing package rweka however rjava is up to date

I am trying to install the package RWeka. I installed the java version 8, but i am keep getting this error. Can anybody help? > install.packages('RWeka') There is a binary version available but the source version is later: binary source…
Doris
  • 1
  • 1
0
votes
1 answer

How can i execute a jar file and capture the output for use in my R script?

The jar file I am using has an output of a bunch of text files. I would like to use these files for text mining. Rather than execute the jar file separately and then use the output for my R script, I want my R script to initiate the jar execution as…
alapalak
  • 147
  • 2
  • 2
  • 9
0
votes
1 answer

How can I solve the error for crawling send mail data in r?

I tried to crawl my email data by using 'edeR' package. I succeeded in getting 'inbox' folder, but failed to get 'sent mail'. Here are the codes. Sys.setenv(JAVA_HOME="C:/Program…
Minji Kim
  • 1
  • 1
0
votes
0 answers

Making R package and includes Jar files in

I use RStudio to make my package. The idea is one of the functions in my R file runs a jar file using System(). it works fine using Rstudio. The problem comes with distribution. when I use devtools::install_github("package on github"). it ignores my…
0
votes
1 answer

ldconfig rJava does not work

I am working on an open source R package which requires rJava and RWeka and somehow the rJava and RWeka breaks mysteriously on my local machine. Anyone knows why the rJava could break ? It seems that the system could not find the shared object, so…
sunxd
  • 743
  • 1
  • 9
  • 24
0
votes
0 answers

Unable to find the JVM during `conda build`

I've been trying to build an R package with conda this afternoon and seem to keep running into an issue with rJava. The build process can't seem to find the JVM. I'm running this under OSX 10.12.3 with Java version. Any thoughts on how to help the…
Chris
  • 3,109
  • 7
  • 29
  • 39
0
votes
1 answer

Install rJava on RHEL6: even with identical Java path I get: error: One or more JNI types differ from the corresponding native type

I am working on a Linux server RHEL6 and I installed anaconda. I have the following setup conda-env version : 4.3.13 conda-build version : 2.1.4 python version : 2.7.13.final.0 rpy2 : 2.8.5 I installed rpy2 to use R in python. But with the…
Dr. Fabien Tarrade
  • 1,556
  • 6
  • 23
  • 49
0
votes
1 answer

How to run R script from RGUI using Rscript command?

I am trying to run R script using RGui using Rscript command. It throws me error saying Error: object 'Rscript' not found. I am able to run this script from command prompt successfully. What I need to set in RGui to make it run??
RockySingh
  • 11
  • 1
  • 4
0
votes
0 answers

rJava run r script file error

I am able to run r script with rJava, but all the control flow in the r script file seem not running, mean it will run all the line without care about the if statement and the trycatch error. I run the same script in r or r studio and it can run…
TK Thong
  • 23
  • 4
0
votes
1 answer

JRI: obtain error messages from the R engine

I am using JRI to execute a number of computations using the R engine. As pointed in various tutorials out there in the web I am using the eval method of the Rengine class, e.g.: engine.eval("meanVal=mean(rVector)"); At some point the eval method…
Luís de Sousa
  • 5,765
  • 11
  • 49
  • 86