Questions tagged [renjin]
Renjin is an R language interpreter for statistical computing that runs on a Java Virtual Machine (JVM).
91
questions
0
votes
0
answers
90
views
Many errors while running Renjin with packages in Eclipse
I've been trying to run some simple code from the first lesson of R for Data Science using Renjin in Eclipse. The reason I'm using Renjin is because I'm eventually going to develop this into a Java ...
0
votes
0
answers
30
views
What repository does tidyverse require in pom.xml when using Renjin?
I'm following the "R for Data Science" tutorial for using the tidyverse. Because I'm eventually going to create a data analysis program in Java using Renjin, I need to be able to use the ...
0
votes
0
answers
50
views
Exception initializing compiled GNU R library class org.renjin.cran.dplyr.dplyr
I don't know anything about programming in R, but I was given a script that I have been having a hard time trying to get working. I noticed that it is importing a couple of libraries, but I am having ...
1
vote
0
answers
55
views
Calling R script from Java using Renjin and pass binary as parameter
We have Java web application running in Tomcat. We want to integrate R scripts (code already exist) into our application and planning to use Renjin to accomplish that. We will crate simple UI where ...
0
votes
1
answer
58
views
Renjin NullPointerException
i get a NullPointerException in Java if i run Renjin with the following dependencies in Maven:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.renjin</...
2
votes
1
answer
261
views
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 ...
0
votes
0
answers
65
views
How to use seasonality in auto arima in Renjin?
model <- auto.arima(log(tsdata),approximation = F, stepwise = F, seasonal = T, D=1)
This code is not working in Renjin, whereas this code works in RStudio for same data points.
In Renjin I get ...
0
votes
1
answer
57
views
Unable to integrate Rcpp package of renjin
I am trying to integrate r code in java and want to use c++ code in r code, but i am getting the following error.
"org.renjin.eval.EvalException: Could not resolve native method
'...
2
votes
0
answers
54
views
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 ...
0
votes
1
answer
205
views
Does Renjin 3.5 support ggplot2?
I am getting an error when executing a simple ggplot2 script. I thought ggplot2 was supported since Renjin 3.5 Beta or maybe I am doing something wrong. I am using the ClasspathPackageLoader and add ...
0
votes
1
answer
175
views
org.renjin.cran libraries missing from repositories
Attempts to update our maven dependencies have recently uncovered a problem.
Many errors are thrown, similar to this one: Error downloading org.renjin.cran:BH:1.62.0-1-b8 ...
0
votes
1
answer
104
views
Which R versions does Renjin support?
I could not find either in the documentation http://docs.renjin.org/en/latest/library/execution-context.html or here any information on how to configure an specific R version. Is there a way to ...
1
vote
1
answer
184
views
Renjin cannot install (default) packages
I am new to Renjin and cannot install packages with the AetherPackageLoader. I am getting the same error as in Renjin can't load pckages but with a seemingly correct Gradle file (please notice the ...
1
vote
0
answers
825
views
Error : replacement has x rows, data has y
I am running this R script from Java (I am using Renjin):
getCoefficients <- function(x, y, Regions) {
nbRegions <- length(Regions)
lengthY <- length(y)
colRegions <- NULL
from <...
0
votes
1
answer
84
views
Rccp.h not found in Renjin when compiling package
I want to compile the units package in Renjin, which currently does not work in the online repository, see http://packages.renjin.org/package/org.renjin.cran/units/0.6-3/build/5
I created a pom.xml ...
-1
votes
2
answers
117
views
Using renjin with a different slf4j implementation
I'm using renjin in a Java web application to load RData files.
Since I'm in a corporate network i only have access to packages from maven central. Since renjin is hosted in a different repository i ...
1
vote
1
answer
121
views
How to use Renjin Maven plugin with c and fortran
I'm trying to use "Renjin Maven plugin" to convert an R package to a jar that I can use with renjin in java.
There is a description here:
http://docs.renjin.org/en/latest/writing-renjin-extensions....
0
votes
1
answer
68
views
Renjin: How to clear context?
As I understand, Renjin context contains variables with their values.
Suppose, I invoked this once:
engine.eval("df <- data.frame(x=1:10, y=(1:10)+rnorm(n=10))");
engine.eval("print(df)");
engine....
1
vote
1
answer
104
views
org.renjin.eval.EvalException: Exception calling R_parse : Unsupported pointer store to a memory region allocated for primitives
I am trying to run the following code from Java using org.renjin Package.
library('org.renjin.cran:jsonlite')
data <- stream_in(file("src/main/resources/Events.json"))
print(data$timestamp)
I am ...
0
votes
1
answer
717
views
syntax error, unexpected SYMBOL, expecting ',' while converting list to data.frame in R
Trying to convert java resultSet data to data.frame in R. Up to 5 rows no issue. But when more than 5 records are converting then getting the error "syntax error, unexpected SYMBOL, expecting ','"
...
1
vote
0
answers
82
views
How to convert Java ResultSet to R DataFrame?
I want to convert resultset table data to dataframe from Java to R. Get the ResultSet in Java and convert it to R compatible format and use the same as dataframe in R.
0
votes
1
answer
55
views
NoSuchMethodError org.renjin.gnur.api.Utils.R_qsort_I
Trying to execute RandomForest on sample dataset, but facing method was not found issue as below.
Using the below libraries.
Using these external libraries.
bitops-1.0-6-b237.jar
caTools-1.17.1-b220....
0
votes
1
answer
60
views
Jar file not running when project and Renjin get compiled using a single Jar?
I'm making a java project on Eclipse that is using Renjin.jar file. The project run fine on IDE but when I export it to an executable jar file, it does not work or work partially until it reach a ...
2
votes
1
answer
310
views
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 ...
0
votes
1
answer
135
views
Renjin 'IOException while loading package' on Elastic Beanstalk
I have a solution that relies on Renjin + Forecast package that works either locally or on a typical EC2 server in Amazon. However, when deploying this same solution on an elastic beanstalk ...
0
votes
1
answer
166
views
Exception in thread "main" org.renjin.eval.EvalException: Could not resolve native method 'dplyr_combine_vars' in package 'dplyr'
I am getting following error when running R through renjin , can someone help me
I am using following packages
library(dplyr)
library(downloader)
when I run through R studio it works fine but not ...
1
vote
1
answer
482
views
Renjin can't load pckages
I'm a newbie with Renjin. I'm trying to use Renjin in a Java application. I'm trying to develop the example showed here.
I'm compiling with gradle, as recommended in the renjin's web page.
So, with ...
2
votes
0
answers
105
views
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 ...
1
vote
1
answer
271
views
IOException while loading package org.renjin.cran:rgeos: Could not resolve native method 'rgeos_Init' in package 'rgeos'
Hi I am new to R language and renjin. In my project following is the maven dependency added.
<dependency>
<groupId>org.renjin.cran</groupId>
<artifactId>rgeos&...
0
votes
1
answer
342
views
Exception in thread "main" org.renjin.eval.EvalException: Could not load package CHAID; tried org.renjin.bioconductor:CHAID, org.renjin.cran:CHAID
When I am trying to run a R script in my Java web application using Renjin I am getting an exception-
Exception in thread "main" org.renjin.eval.EvalException: Could not
load package CHAID; tried ...
1
vote
1
answer
364
views
Moving data between Java and R using renjin
I'm trying to move data between Java and R and vice-versa (as a dataframe) using Renjin. Searching in Stackoverflow I've find something that at first I've thoutht it would work but It wouldn't because ...
2
votes
2
answers
224
views
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 ...
1
vote
1
answer
160
views
FileReader can't find R Script
I try run my R Script within JavaFx. I use Renjin for this purpose and it seems to work properly with statements I run internally. But I want to run an external R Script. The project is set up with ...
1
vote
0
answers
90
views
Renjin : printing "externalptr"
From Java code I'm pushing into Renjin a data.frame. The fisrt vector of this data frame contains native Java objects as ExternalPtr. Everything works fine including accessing those objects from R ...
1
vote
1
answer
117
views
Renjin : engine.eval returned value
In Renjin, what is the actual value returned by :
engine.eval("...")
For example:
df <- data.frame( 1 )
df[["X1"] <- df[["X1"]] * 10
returns a DoubleArrayVector with the single 10 value. I ...
0
votes
1
answer
111
views
How to display output on textpane in java renjin?
I'm beginner in java and renjin.
I need my output result show in my jtextpane, How I can do that? I'm so tired.
If you know how to do it, please tell me.
thanks
RenjinScriptEngineFactory factory = ...
1
vote
1
answer
77
views
Working with date and times in Renjin
I'm a bit lost, how can I pass to renjin an array of datetime (going though string would be really a pain). It can be a Joda or Java dateTime class or similar
I haven't found either a datetime type.
0
votes
1
answer
125
views
Renjin IOException while loading package Rweka, could not find function '.jfield'
I´m trying to execute a R script inside a Java program, all dependencies are installed with Maven but the problem still there.
In my research to fix the problem I found that jfield is a function ...
1
vote
1
answer
50
views
Renjin does not recognise german umlauts
I have a file which extensively uses the german umlauts. I wrote a script to process the file which works as it should in native R (RStudio). Unfortunately, while using Renjin, all umlauts are set to ...
0
votes
1
answer
235
views
Get variables names from string expression in R (Renjin)
I'm using Renjin to evaluate R formulas from my Java program. Basically the user is typing an R formula in a text field, and I want R/Renjin to do the parsing for me, and return a list of the ...
0
votes
2
answers
2k
views
Sourcing multiple R files in
Currently I am using R on my local machine, where I am able to source multiple R scripts conditionally (as they are placed in my local drive).
However when I need to use same scripts on RENJIN in ...
0
votes
1
answer
65
views
Warning Messages in Renjin
I am using Renjin to use R code in Java.
when I am running R code with syntax:
"engine.eval(new java.io.FileReader("Forecast_temp.R"));"
where "Forecast_temp.R" is the R code file.
Renjin is showing ...
2
votes
0
answers
73
views
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, ...
2
votes
1
answer
54
views
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("....
1
vote
1
answer
38
views
Migrating setLibraryPaths method from 0.6.8 version
We are migrating Renjin to the latest version and as part of the settings we included a directory with user defined R libs.
How can we migrate the following line ?
renjinContext.getGlobals()....
0
votes
1
answer
170
views
Renjin/Java - Vector class to Java array class
I’m currently using Ro.getElementAsDouble(index) (code is below) to extract the values in Ro one by one into LogNormArray (double[]). But I worry that a copy is wasting memory. I’m very much a newbie ...
1
vote
2
answers
3k
views
Convert CSV file contents to Markdown
Background
The objective is to read from a CSV file and write the contents in a Markdown table format.
The application uses the R engine Renjin, which does not support knitr, kable, or pandoc.
...
0
votes
1
answer
103
views
Rsolnp in Java using Renjin
I am trying to run solnp from withing a Java program. To test that this is working, I am trying to just run the benchmarkids() function. But I can not solve the reference to the package. I've checked ...
1
vote
2
answers
328
views
Load .RData from an R script in Scala using Renjin
I have an R script load.R that attempts to do
load("test.RData")
When I run:
engine.eval(new FileReader("load.R"))
An exception occurs:
Exception in thread "main" java.lang....
0
votes
1
answer
67
views
Unable to create png using renjin
Hey I am trying create png file using renjin ,but it's giving me following error
Object 'Cdevga' not found.
More details ::
renjin version > 0.8.2294
script > png('test.png')
I also tried to use ...