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

JRI: how to get the console output in a Java String

I declare the JRI engine as follows in my Java program: REngine eng = REngine.engineForClass("org.rosuda.REngine.JRI.JRIEngine", args, new REngineStdOutput(), false); This works fine however I would like to get the console output in a Java…
ps0604
  • 1,227
  • 23
  • 133
  • 330
0
votes
1 answer

rJava can load in RStudio but not in R, OS is Ubuntu 14.04.1 LTS

I have rJava installed, it loads well in RStudio, but cannot load when I start R from Terminal, or from crontab. I've tried all possible ways I found online, what else can I do now? 0.1. Error message library(rJava) Error : .onLoad failed in…
Dan
  • 3
  • 2
0
votes
1 answer

.jcall error cannot determine object class

I want to use .jcall from the rJava package to call a custom java class method. According to the following example from the rJava-documentation .jcall("java/lang/System","S","getProperty","os.name") I tried…
Oblomov
  • 8,953
  • 22
  • 60
  • 106
0
votes
1 answer

JRI, Java and R: variable is not accumulated between evals

In this code variable xx returns 0 instead of 20, shouldn't it be calculated and its value kept between evals? String[] Rargs = {"--vanilla"}; Rengine re = new Rengine(Rargs, false, null); if (!re.waitForR()) { …
ps0604
  • 1,227
  • 23
  • 133
  • 330
0
votes
2 answers

EXCEPTION_ACCESS_VIOLATION when trying to use RJava

So I'm trying to make use of R from Java through JRI. I'm using the RJava plugin for Eclipse and the two test files which come with rJava are working fine (rtest and rtest2). But when trying to run this simple code fragment, I get an…
Koekje
  • 677
  • 1
  • 6
  • 17
0
votes
1 answer

Session aborting while loading library iplots

I tried to load the library Deducer, and while doing so the packages ggplot, JGR, rJava, and JavaGD were loading successfully, but my R-session is aborting when plotting.
Othin Ram
  • 13
  • 1
  • 3
0
votes
2 answers

Error installing R package

EDIT:1 I have already seen Using the rJava package on Win7 64 bit with R I have Windows 7 64-bit Machine with R 3.1.0, Java 7u67 64-bit installed. (NOTE: I am not allowed to update R) JAVA_HOME is set to C:\Program Files\Java\jre7 and PATH…
Khurram Majeed
  • 2,291
  • 8
  • 37
  • 59
0
votes
1 answer

RJava and XLConnect in RStudio not loading

First the tech specs of what I am using: RStudio 0.98.983 R 3.1.1 (64 Bit) Windows 8.1 When trying to load XLConnect I receive the following error Error : .onLoad failed in loadNamespace() for 'rJava', details: call: fun(libname, pkgname) error:…
Michael
  • 3
  • 1
  • 3
0
votes
0 answers

rJava not Installing in AIX

I am trying to install rJava in AIX. But it fails with following error: exec(): 0509-036 Cannot load program /usr/java6_64/jre/bin/java because of the following errors: 0509-150 Dependent module…
Prasanna Nandakumar
  • 4,295
  • 34
  • 63
0
votes
0 answers

"Unable to compile a JNI program" when installing rJava

I'm trying to install the rJava package (R 3.0.2, Ubuntu 14.04) and I get the following: > install.packages('rJava') ... checking Java support in R... present: interpreter : '/usr/bin/java' archiver : '' compiler : '/usr/bin/javac' header…
cjolley
  • 441
  • 6
  • 15
0
votes
0 answers

rJava installation from local directory in windows

I installed R 2.11.1 and am running java 1.7.0 I downloaded the rJava source file rJava_0.8-8.zip from http://cran.us.r-project.org/bin/windows/contrib/2.11/ and ran install.packages("rJava_0.8-8.zip",repos=NULL,type="source") in R from the…
Bokha
  • 121
  • 1
  • 6
0
votes
0 answers

For frequency 365 i am getting straight line in forecasting while i think it should be a zig zag graph

I want draw a zig zag graph with proper date format while it show date like 2001.00,2001.01 etc #import forecast library library('forecast'); #prepare rawdata object for froecating rawdata <- read.csv('bigDataSet6.csv',sep=','…
0
votes
1 answer

Getting null from R script which performs long-running query

I have an R script that retrieves data from a database, performs some operations on it and provides me with data I want to retrive in Java using JRI beforeQuery <- c(1) query <- {{Query}} .... queryResult <- fetch(queryResultSet,1) The Java code…
punitjajodia
  • 92
  • 1
  • 7
0
votes
0 answers

rJava: java code altered but R object the same

I have a simple java program that creates an array of random numbers. I am using rJava to call this program and create an R object. I know how to create random numbers in R ... I am trying to reproduce the results of a complicated java program…
0
votes
1 answer

Executing an R script in a way other than using source() in JRI

I am new to R and have been trying to use JRI. Through JRI, I have used the "eval()" function to get certain results. If I want to execute an R script, I have used "source()". However I am now in a situation where I need to execute a script on…