Questions tagged [jri]

JRI is a Java/R Interface, which allows to run R inside Java applications as a single thread.

JRI comes bundled with rJava, so the best way is to simply install rJava. It is available from CRAN, so you can use in R:

install.packages("rJava") 

JRI uses native code, but it supports all platforms where Sun's Java (or compatible) is available, including Windows, Mac OS X, Sun and Linux (both 32-bit and 64-bit).

143 questions
3
votes
1 answer

Creating data.frames in R from Java via JRI

I can use an R environment from Java using JRI, but I'm wondering if there's a better way to create data frames than the following (using Scala syntax for arrays): r.assign("predictor1", Array(1,2,3,1)) r.assign("predictor2",…
Yang
  • 16,037
  • 15
  • 100
  • 142
3
votes
1 answer

calling plots from R into Java application

Is there anybody who is succesfully working with JRI and rJava? I want to put some graphs, plots made in R into my Java application, but without success. Can anybody provide working example. Here is what I found, but its not working. import…
troger19
  • 1,159
  • 2
  • 12
  • 29
3
votes
0 answers

rJava: REngine or Rengine, what is the difference?

I notice that there are two classes you can use in JAva to talk with R: REngine, Rengine Despite each has different ways of creating an instance and different methods to evaluate an R expression, what are the key differences? Which one should I…
Ziqi
  • 2,445
  • 5
  • 38
  • 65
3
votes
1 answer

how to execute a java function in parallel with a joptionpane

I want to execute a function in java, but meanwhile I want to show a JOptionPane to the user when the operation starts and when it ends, the problem is that if I don't push the "Accept" buyton of the first JOptionPane, my function doesn't starts,…
Angel Ruvalcaba
  • 105
  • 1
  • 6
3
votes
2 answers

JRI return code 10

I'm new to R and was attempting to call a simple rJava test program from java. I have done the necessary path settings and when I am attempting to create a Rengine instance the code is failing. The issue seems to be with C [R.dll+0x26036].…
Ayon
  • 315
  • 3
  • 20
3
votes
2 answers

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…
user2844485
  • 1,112
  • 3
  • 15
  • 26
3
votes
1 answer

Passing in-memory data to an R script to create a model

I am new to R and have been trying to use JRI. I am faced with the following issue - I have a set of values that I have received in my Java program which I have stored in a list. I have multiple such lists - each one representing a feature. I want…
3
votes
0 answers

JRI - Checking for type of returned value from R script

I am using JRI and calling R script from Java. The R script returns an integer. Following is how I am calling the R script - REXP result = rengine.eval("source(\"" + [script name with path] + "\")"); REXP retVal =…
3
votes
0 answers

Status of JRI: R interface to run R inside Java application

Recently JRI was made part of rJava, as by www.rforge.net/JRI "so if you simply want to use JRI, install rJava binary and your'e all set!" That said, where is the documentation? "http://cran.r-project.org/web/packages/rJava/rJava.pdf" doesn't…
antonio
  • 10,629
  • 13
  • 68
  • 136
3
votes
1 answer

Reading R-Errors through JRI

i'm using JRI, to talk to R through Java. If i try to get the result of my R-Code as Double i get a NullPointer. Normally this is caused by an error of R. Is it possible to get the output of the R-Console into Java in order to read the error?
Arlzheim
  • 85
  • 8
2
votes
1 answer

Java/R Interface (JRI)

I want to call some R code from within Java, on a Linux machine that has R installed already, so the Java/R Interface (JRI) is needed. However, I am not sure how to go about this. The JRI homepage says that the package is bundled in rJava. So, I…
PNS
  • 19,295
  • 32
  • 96
  • 143
2
votes
1 answer

Issues with JRI library on 64-bit environment

I am trying to setup and use JRI on 64 bit machine. I have installed R 2.14.1 and rJava 0.9-3 with 64-bit JVM. I have managed to install rJava package in R using command install.packages("rJava") But still when trying to access it through code, I…
sachinsd
  • 51
  • 3
  • 10
2
votes
1 answer

Is there some text mining&data analysis plugins similar to tidyverse package(R) in Android instead?

I would like to create an android application which can produce plots and stats related to the textual data.I want to perform the same "data analysis"/text processing which I am enabled to with tidyverse and the correlated packages in R.I know that…
eddybudge
  • 165
  • 1
  • 8
2
votes
0 answers

Failed to write core dump while loading R library with JRI in Java

I have this strange error while trying to load some R libraries (for example stats4, plyr, dplyr, sqldf) using JRI in java. Instead, with some others, like stringr or stats, everything is apparently fine. I wrote a very easy Java program just to…
Mario
  • 137
  • 1
  • 10
2
votes
1 answer

R libraries not loading using JRI in Java

I am trying to read an excel using r in Java using JRI(JAVA R INTERFACE) but it is not working .I have listed some errors which I believe might be the reason- R libraries not loaded properly. Error in the file location(because of the…
Aakash
  • 79
  • 6
1
2
3
9 10