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
0 answers

Jackcess from R using rJava in OSX

I tried all the suggestions in this related question and still get the last error library(rJava) .jinit(force.init = T) .jaddClassPath(dir('~/Dropbox/R_packages/JavaJS/',full.names = TRUE))) mol.db <- "~/Downloads/SEPULVEDA_MOLECULAR.accdb" jfile =…
Jorge Sepulveda
  • 291
  • 2
  • 8
0
votes
1 answer

Installing rJava on centos (64 bit). Could not find lpcre, llzma

I am trying to install rJava on centos7 (64bit). I am getting the following error /usr/bin/ld: cannot find -lpcre /usr/bin/ld: cannot find -llzma collect2: error: ld returned 1 exit status I have tried to install the following for llzma Package…
Anil K
  • 137
  • 1
  • 10
0
votes
1 answer

How to call "public void" method through rJava

In testing a Java API, I need to change a default setting. According to the API's document, it should be done using a method defined within the class using "public void setType". Suppose the class name is 'Node', which is referred using…
Tony
  • 43
  • 3
0
votes
1 answer

Unable to run string related functions using rJava (JRI) in Java

I have written a small program in Java (eclipse) to run R using JRI (rjava). All paths are set. The problem is that while I can run numeric functions (like add), I can't run a string function like cat. (please excuse any errors; I did Java coding…
shishir
  • 1
  • 1
  • 1
0
votes
1 answer

installing venneuler and/or rJava R package

I'm trying to install the venneuler R package on linux. Running: install.packages("venneuler") gives this error: configure: error: One or more Java configuration variables are not set. Make sure R is configured with full Java support (including…
dan
  • 6,048
  • 10
  • 57
  • 125
0
votes
1 answer

Calling R script function from Java using rJava

My Requirement - I need to deploy a Java webservice in a server which internally executes a R scipt file. I googled about various solutions for calling R from Java and the best were rJava and Rserve. Using Rserve I can call R function BUT as I am…
Rana
  • 505
  • 1
  • 5
  • 19
0
votes
1 answer

Using RQuantLib in Java with RJava

i'm relatively new to using RJava and was getting a null pointer exception from a piece of code I was trying out. I suspect that this could be due to the data type I am using, but am a bit confused about how to solve this. Any help with this would…
Karan Pillai
  • 15
  • 1
  • 5
0
votes
1 answer

How to return Java Object of class into R (with rjava package)

is there anyone, who is working with R and is using java code there? I mean calling Java code from R with "RJAVA" package. I create my own package and there I have jar file of java code. (like there…
L. Rohal
  • 3
  • 5
0
votes
2 answers

How can I evaluate / execute a multiline R script using rjava

I am experimenting with calling R from within Java using rjava's Rengine.eval() method. I have succeeded at running a simple "hello world" script and running simple analyses as long as I keep to single line statements. When I try to execute a multi…
Skifozoa
  • 303
  • 2
  • 13
0
votes
0 answers

How do I instantiate a class from this JAR file using rJava?

I was working on a text-analysis project in R and needed a stemmer. I found a JAR-file of a java compilation of a snowball stemmer. Documentation: http://lucene.apache.org/core/3_0_3/api/contrib-snowball/ Download link (bottom…
dimpol
  • 545
  • 9
  • 21
0
votes
0 answers

rJava package installation error in R linux

I am trying to install "rJava" in a linux machine. Current R-version is : R version 3.3.1 (2016-06-21) -- "Bug in Your Hair" java is already installed and JAVA_HOME variable is set to :…
DileepGogula
  • 331
  • 5
  • 20
0
votes
0 answers

not able to use rJava after installing the package successfully

I am not able to use rJava after installing the package successfully. library("rJava") Error : .onLoad failed in loadNamespace() for 'rJava', details: call: dirname(this$RuntimeLib) error: a character vector argument expected Error: package or…
0
votes
0 answers

R source file from RConnection (JRI) "could not find function"

I'm trying to source a R script file from an org.rosuda.REngine.Rserve.RConnection and then calling a function from that script, but am getting, "Error: could not find function "main". Start Rserve from terminal > require(Rserve) Loading required…
Dilbert
  • 63
  • 6
0
votes
0 answers

Rengine.eval returns null

I have the following implementation: public static void main(String[] args) { // new R-engine Rengine re = new Rengine(new String[] { "--vanilla" }, false, null); if (!re.waitForR()) { System.out.println("Unable to load R"); …
Rahul Sharma
  • 892
  • 1
  • 6
  • 16
0
votes
1 answer

how to Stop/Kill Rengine thread

i'm trying to kill/stop Rengine thread but i can't, even if call end() method also. see the bellow peace of code. Rengine engine = new Rengine(new String[] { "--no-save" }, false, null); ---- ---- engine.end(); System.out.println("engine:::…