Questions tagged [renjin]

Renjin is an R language interpreter for statistical computing that runs on a Java Virtual Machine (JVM).

Renjin

Renjin is an R language interpreter for statistical computing that runs on a Java Virtual Machine (JVM).

Renjin can outperform the standard GNU implementation of R when working with larger datasets. Additionally, Renjin offers easy integration with other software written for Java Virtual Machines, among other advantages.

Official documentation

Support for CRAN or Bioconductor packages

StackOverflow questions often pertain to errors with the CRAN or Bioconductor packages in Renjin. Before asking a question, check the package list to ascertain if the package in question is supported.

See Also

90 questions
10
votes
1 answer

is it possible to use renjin within rstudio

I wanted to try out a faster version of R in Windows. pqR / Riposte do not have a Windows version. Renjin's website had a Renjin Studio GUI (for all platforms), which opens up a console where I can run R commands but that's not too useful. I…
uday
  • 6,453
  • 13
  • 56
  • 94
4
votes
1 answer

R Script not able to read .Rda file when executed from Java

I'm new to Rscript so please bear with me, I need to execute a R script (written by another developer) from java and for that I'm using Renjin. The R script file and other required files are on classpath i.e. under resources folder. To achieve this…
Akhil
  • 1,184
  • 1
  • 18
  • 42
4
votes
2 answers

Renjin - how to use values generated in java

I'm using renjin and I'm trying to use values I generated in the java code with the r-code, for instance: int x = 7; try { engine.eval("tmp<-c(x, 4)"); engine.eval("print(tmp)"); } catch (ScriptException ex) { ; } However, this does not…
newnewbie
  • 993
  • 2
  • 11
  • 26
3
votes
1 answer

How to plot in java using renjin

I've recently discovered renjin and its great at making R easy to use in java. However I'm having some issues with my main use of R, which is data visualisation, and getting the R plots into my swing application. My aim is to simply allow the user…
Sebastian Zeki
  • 6,690
  • 11
  • 60
  • 125
3
votes
0 answers

Porting a R-CRAN package to renjin using the forecast package as an example

renjin's approach seems to be great. However compatibility to base R is not 100% and there are lots of very interesting packages out there which do not / only partly work with renjin. I am fairly new to renjin but really would like to use it. But…
Georg Heiler
  • 16,916
  • 36
  • 162
  • 292
3
votes
0 answers

Renjin "save" saves a null data frame

I have the following Renjin Java Code, the code assigns data from Java into Renjin (2 double arrays), creates a new data frame, prints in and saves it as Rdata, as following: engine.put("adId", adId); engine.put("LandscapeCurrent",…
Yehoshaphat Schellekens
  • 2,305
  • 2
  • 22
  • 49
3
votes
1 answer

If you have created a function in R, how do you call it in Java using Renjin?

Let's say I have created a function in R like bin <- function(arg1, arg2, arg3) { //some code here } I am using Renjin to run R on the JVM. From my Java program, I want to call my R function bin. I know you need to use something similar to this…
monj
  • 33
  • 2
3
votes
3 answers

Load Packages into Renjin in Scala or Java

I am running a scala application and would like to call a R file using Renjin and pass values to the R file from scala. When I load the R file from scala i get error on laply package not found. It would be great if some one could tell me how to load…
Pawan
  • 1,954
  • 4
  • 21
  • 27
2
votes
1 answer

Loading rdara/rds file in Java using Renjin

I want to load & parse RDS/RData files in Java, i've made some googling and found that Renjin helps calling R functions in Java. (i'm not a R developer and i didn't even know the existance of these files before ^^') so this is my R code : my_data <-…
2
votes
0 answers

UnsopportedOperationException TODO when running R script with renjin in java

I'm new to R and Renjin, but I'm trying to run a legacy R script from a spring boot service and I'm getting this Unsupported exception. I've narrowed down the issue on the legacy script to a call made to svymean R function. I've added details in…
2
votes
1 answer

How to improve processing time of loops in R, manual xgboost prediction

I have a trained xgboost model in R, and my application server can run R but can't install package:xgboost (not supported by renjin, which is JVM-based interpreter for R). So to deploy my model, I needed a way to score new data without…
Bob
  • 21
  • 3
2
votes
0 answers

Java 10 and Renjin hangs Intellij

After upgrading to Java 9, then to Java 10, I noticed in both cases, after a couple hours of debugging, that it is the Renjin library that hangs Intellij, for example, when I try to run any program in the project. What happens is that the IDE just…
Morkus
  • 517
  • 7
  • 21
2
votes
2 answers

Return a number as a comma-delimited string

Background Due to a bug in Renjin, the format family of functions are unavailable, but sprintf works. Code Here is a replacement function that converts a number to a comma-delimited string: commas <- function( n ) { s <- sprintf( "%03.0f", n %%…
Dave Jarvis
  • 30,436
  • 41
  • 178
  • 315
2
votes
0 answers

My R function is returning an incorrect result when invoked by Renjin

If I invoke my R script's compute_score function in R studio, the geography score returned is 68.18, which is what I expect. However when I invoke the same function in Renjin it is returning 60.0, which is incorrect. I have used the exact same value…
Aamir
  • 21
  • 1
2
votes
1 answer

Is a Renjin Session reentrant

A Session is Renjin is not thread safe as described here, but is it reentrant safe ? The scenario is calling from java engine.eval("...") that has a Java class that calls again the same engine.eval("..") method. Let's assume we've only one engine…
ic3
  • 7,917
  • 14
  • 67
  • 115
1
2 3 4 5 6