[R] calling r from java
Eduard Drenth
edrenth @end|ng |rom |ry@ke-@k@demy@n|
Wed Dec 2 13:42:19 CET 2020
For those interested, I succeeded in creating a stable, fast Java/R
connection using https://search.maven.org/search?q=g:org.rosuda.REngine
. The whole solution has a maven/docker setup making it reproducable.
-----Original Message-----
From: Eduard Drenth <edrenth using fryske-akademy.nl>
To: r-help using r-project.org <r-help using r-project.org>
Subject: Re: [R] calling r from java
Date: Mon, 30 Nov 2020 08:36:16 +0000
sun.misc that is
-----Original Message-----From: Eduard Drenth <
edrenth using fryske-akademy.nl>To: r-help using r-project.org <
r-help using r-project.org>Subject: Re: [R] calling r from javaDate: Mon, 30
Nov 2020 07:18:46 +0000
First attempts to use jri on ubuntu 20.04 stranded.Steps I followed:1)
download rJava from https://www.rforge.net/rJava/files/
2) create a symlink /usr/lib/libjvm.so to /usr/lib/jvm/java-8-openjdk-
amd64/jre/lib/amd64/server/libjvm.so3) configure and make jri4) createa
symlink /usr/lib/libjri.so5) put the built JRI.jar in local mavenrepo6)
include a dependency to the jar7) create and run a hello worldtest for
RengineThe test fails because com.misc.Unsafe.prefetchRead isn't found.
AsIunderstand depending on com.misc.Unsafe.* is a risk.I will not
follow this route any further for now, though I stillthinkhaving jri
available would be great. Steps to get there are Ithink:1) remove
com.misc.Unsafe usage from the solution2) make libjriavailable in
repositories (apt, yum, other)3) make JRI.jar available inmaven
centralBye, Eduard-----Original Message-----From: Eduard Drenth
<edrenth using fryske-akademy.nl>To: spurdle.a using gmail.com
<spurdle.a using gmail.com>Cc: r-help using r-project.org <r-help using r-
project.org>Subject: Re: [R] callingr from javaDate: Sat, 28 Nov 2020
11:57:49 +0000Thanks all, I'll go for https://www.rforge.net/JRI/ and
thelibrariesinmaven https://search.maven.org/search?q=jri
The maven library is build from here
https://www.rforge.net/rJava/files/ back in 2017.After this no new
libsare published to maven.It would be nice (understatement) if
publishingnew rJava componentstomaven becomes a regular part of R
deveopmentprocesses.This would promote R use from Java which I think is
good.Andof course I can help.Bye, Eduard-----Original Message-----From:
AbbySpurdle <spurdle.a using gmail.com>To:Eduard Drenth <edrenth using fryske-
akademy.nl>Cc: r-help using r-project.org <r-help using r-project.org>Subject:
Re:[R] calling r from javaDate: Sat, 28Nov 2020 15:55:36 +1300Hi
Eduard,
> Now I developed a service that
> executesRscript(UsingProcessBuilder),sends text to stdin of the
> process andreadsfromstdout of theprocess.
This doesn't answer your question, but may be relevant.I have a java-
based application that works on a similar
principle.(Thecodeishorrendously bad and most of it should be thrown
away).I'mplanningto write a terminal emulator, in the
nearfuture.(Currently,secondplace on my top-level todo list).The
primary objective is tobuildobject-oriented and messagepassingAPIs on
top of the coreterminalemulation system, with at leastsomecross
platformfunctionality.Notingthat, in my opinion, the cross-platform
aspect ismoreimportant for R,than in many other IPC topics.Hence, I'm
interestedin hearing"wishlist" items
forsuchAPIs.______________________________________________R-help using r-
project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained,
reproduciblecode.______________________________________________R-
help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible
code.______________________________________________R-help using r-project.org
mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Eduard Drenth, Software Architekt
edrenth using fryske-akademy.nl
Doelestrjitte 8
8911 DX Ljouwert
+31 58 234 30 47
+31 62 094 34 28 (privé)
skype: eduarddrenth
https://github.com/eduarddrenth
frisian.eu
gpg: https://pgp.surfnet.nl/pks/lookup?search=eduarddrenth
Op freed bin ik thús/wurkje ik minder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20201202/07017b30/attachment.sig>
More information about the R-help
mailing list