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
2
votes
1 answer

Running simple `Renjin` example on net-beans, with Java code : "Using R within a Java project"

Im tring to run this example from the Renjin website, http://www.renjin.org/documentation/developer-guide.html , im tring to run the first "A simple primer" example. following is my directory layout: And here is my code: package…
Yehoshaphat Schellekens
  • 2,305
  • 2
  • 22
  • 49
2
votes
1 answer

Which R version my PC currently Uses?

Im currently using R through Java, and im not sure which version im using. I've stetted in R studio my R version into version 2.15.3 which is what i need: And so is my enviorment variable setting (R_home): But typing in the command line :…
Yehoshaphat Schellekens
  • 2,305
  • 2
  • 22
  • 49
2
votes
1 answer

Sending R-Errors (from the console) into the Java standard output, when using JRI

Inside my Java code I'm using the eval method (JRI) to run R commands within Java (I'm not interested in reading .R files through source command , due to distribution considerations). I'm trying to debug my R code within Java. Although i ran into an…
Yehoshaphat Schellekens
  • 2,305
  • 2
  • 22
  • 49
2
votes
2 answers

Predictive Analysis using Java

I am working on a Spring based Web application which performs Predictive Analysis based on the user historical data and come up with offers to users. I need to implement a Predictive Analysis or any regression kind of functionality which gives a…
Jeevan Mysore
  • 255
  • 5
  • 16
2
votes
0 answers

Call R with JRI from a Java Servlet/Spring bean

I am developing a Java based web application which needs to use R to perform some calculations. I've been able to install and configure rJava/JRI properly, but I'm stuck at this point: when I call R from a console app, it always works nice, however…
2
votes
1 answer

Distributing Java Application that uses JRI and R

So I am working on a Java Application that uses the JRI library to talk to R (developed in Eclipse on Windows 7). In order to get JRI to work, I had to modify a bunch of environment variables (PATH, R_HOME, R_LIBS_USER) in order to have JRI be able…
2
votes
0 answers

gWidgetsWWW LocalServerStart() through JRI

I'm trying to present interactive R graphics on the web using gWidgetsWWW. When using my standard R command line this all works perfectly. The code I use is for example: > library(gWidgetsWWW) > localServerOpen('Examples/ex-simple-gui.R',…
Matthijs Brouns
  • 2,299
  • 1
  • 27
  • 37
2
votes
2 answers

JRI Fatal Error on Ubuntu

I have successfully installed JRI and rJava on Windows 7. I am now trying to get it to work on Ubuntu with 64bit OS. I can make rJava calls from within R but getting JRI to work is more difficult. I am running NetBeans 7.1.2 and I have followed…
2
votes
1 answer

JRI REngine eval() method always returns null

I have a Java servlet running on Tomcat6 which uses JRI (rJava) to communicate with R installed on an Amazon linux server. I installed R from source, installed rJava via cran and set R_HOME and my classpath for Tomcat. I had to setup a few…
2
votes
2 answers

Invoke R Language/script from java

How do we invoke R language / R script from java? Basically I need java kind of wrapper around R script. Data will be given to java layer say method setData(double[]) which should in turn sends to R script - let us say setDataR(double []) method.…
sset
  • 147
  • 1
  • 8
1
vote
1 answer

Java/R Interface (JRI) code for exchanging data (e.g., PDF values)

Is it possible to do some simple calculations in R, with input from a Java program, and get the response into that Java program? A typical example of this data exchange between Java and R is calculating the Probability Distribution Function (PDF) of…
PNS
  • 19,295
  • 32
  • 96
  • 143
1
vote
1 answer

How to plot svm model by using JRI?

My r code as below: svm_model <- ksvm(xtrain,ytrain,type="C-svc",kernel='vanilladot',C=1,scaled=c()) plot(svm_model,data=xtrain, xlab = "feature2", ylab="feature1") I plot it with command: re.eval("plot(svm_model,data=xtrain, xlab = \"feature2\",…
jesslim
  • 61
  • 1
  • 3
1
vote
3 answers

Installing jri from rJava using cygwin causes error

I am having some difficulties installing jri using cygwin in Windows 7 64 bit I have set R_HOME to "C:\Program Files\R\R-2.14.0" I have also set PATH to "C:\cygwin\home\USER\rJava\jri\;C:\Program Files\R\R-2.14.0\bin\" and I get the following…
Julio Diaz
  • 9,067
  • 19
  • 55
  • 70
1
vote
2 answers

Get R to load in data to a variable from Java, without R sending info back to Java

I'm loading a very large data set into R from java. I have created a Java program that calls R using rJava's jri. This program has been wrapped up into an executable jar file and is being called from the terminal (linux). The data is in region of 50…
Aran Brady
  • 139
  • 1
  • 12
1
vote
1 answer

R/Java .jar - setting environment variables. Native JRI Library not found

I've built an R/Java interface in eclipse which works on my machine. I need to transfer it to another machine and I want to have it as an executable jar file. I have exported the package into an executable jar from eclipse and coupled it in a folder…
Aran Brady
  • 139
  • 1
  • 12