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

Force rJava to use a specific JVM in R

I want to use rJava package in R on MAC OSX (10.10.3). Configuration of the system is as: Haroons-MacBook:~ haroonr$ echo $JAVA_HOME /Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/jre Haroons-MacBook:~ haroonr$ echo…
Haroon Lone
  • 2,837
  • 5
  • 29
  • 65
0
votes
1 answer

Multidimensional arrays and rJava

I'm trying to call java code from R using the rJava package. I need to pass a multidimensional (2d) doubles array to the java method and get back a 1d array of ints. Here's the package information: > sessionInfo() R version 3.2.1…
Cassio Pereira
  • 439
  • 1
  • 5
  • 15
0
votes
1 answer

pass data to R from java using jri

I am trying to integrate R code inside java code.Primary objective is to be able to use predictions on models created in R. I am able to set up the environment properly and basic R commands are working fine. Issue: trying to push data from java to R…
0
votes
1 answer

How to call methods with varargs in RJava with zero values?

I am working on a package that uses RJava for identifier mapping (in biology): BridgeDbR. One of the methods calls a Java method which has vargs, mapID(): xref <- .jnew("org/bridgedb/Xref", identifier, datasource) datatarget <-…
Egon Willighagen
  • 1,621
  • 4
  • 19
  • 36
0
votes
0 answers

rjava jri, Failed on "save", "saveRDS" commands

I am using rJava 0.95, with R3.0.1, java 1.8, and my development IDE is Intellij In my java code I have this line: org.rosuda.REngine.REXP result = re.parseAndEval("save(myObject,file=\"myoutput.R\")"); where "myobject" is a dataset object created…
Ziqi
  • 2,445
  • 5
  • 38
  • 65
0
votes
1 answer

how to call Java method which returns any List from R Language?

How to call java method which returns list from R Language.
0
votes
0 answers

rJava error message: cannot allocate vector of size

Wondering whether you met this before: I installed rJava package in R (R version 3.1.1 (2014-07-10)) on a 64 bit windows system. And when I tried to load this package, I got this error message: library(rJava) Error : cannot allocate vector of size…
Elle L
  • 1
0
votes
0 answers

Rcaller file returning as empty

I am relative new to R and am attempting to call R from my Java code. I was using rJava but faced errors and so switched to rCaller. However, while executing a sample test code the output is coming as empty file. Can anyone shed some light on this?…
Ayon
  • 315
  • 3
  • 20
0
votes
1 answer

p-value calculation using Java

I want to make a Java program to calculate the P-value of my data that I want to upload, but getting too much trouble to do so. The data is been read by the Java program, but next step is to solve data for getting p-value. The input file is: The…
Aju.k
  • 23
  • 4
0
votes
0 answers

Error (as ‘lib’ is unspecified) to install rjava

I am installing rJava on a 64bit machine, running Windows 7, and am encountering the weirdest message. Below is the log. Has anyone seen this before? Thanks in advance. install.packages("rJava") Installing package into…
0
votes
0 answers

rJava Cannot add to classpath

When I attempt to use .jaddClassPath() or .jinit() to modify my classpath, it does not seem to have any effect on it. Here's what I have so far >>classpath /Users/..../someFolder/ >>.jinit(classpath) [1] 0 >>print(.jclassPath()) [1]…
0
votes
1 answer

Loading RJDBC in Shiny app

I have a shiny app running on Ubuntu 14.10 that I need to connect to a SQL Server database. I am using JDBC for the connection. Outside of the app (in the console) I have been able to install the JDBC package and its dependencies, load it, and…
jamarticus
  • 11
  • 5
0
votes
1 answer

Error caused by rJava when loading ReporteRs package

I have problems loading ReporteRs in R. I get the following message: Loading required package: ReporteRsjars Error : .onLoad failed in loadNamespace() for 'rJava', details: call: fun(libname, pkgname) error: No CurrentVersion entry in…
jonny
  • 3
  • 1
  • 3
0
votes
0 answers

Parsing script statements in Java with Regex

I have the following R script in a java String variable (including new line characters): d = 1 for (i in 1:150 ) { d = d + i; } print(d) What I'm looking for is to obtain the R functions, regardless of new lines. Following the previous example, I…
ps0604
  • 1,227
  • 23
  • 133
  • 330
0
votes
1 answer

rJava in RStudio Pro

I have a clean install of RStudio Server (Pro) on clean Ubuntu 14.04. Install was smooth only problem I have is with rJava. Everything else appears to be working fine. To install the rJava package I installed the package from the R (running as…
Matt Gardner
  • 76
  • 1
  • 7