arrow
返回

Executing native Java code in R: an approach based on a local server

delete2020-09-28
delete1
delete
OA
AI
M
Mathieu Fortin *
DOI:10.7717/peerj-cs.300delete
delete原文链接
delete分享
delete收藏
摘要

摘要

En 中文
The R language is widely used for data analysis. However, it does not allow for complex object-oriented implementation and it tends to be slower than other languages such as Java, C and C++. Consequently, it can be more computationally efficient to run native Java code in R. To do this, there exist at least two approaches. One is based on the Java Native Interface (JNI) and it has been successfully implemented in the rJava package. An alternative approach consists of running a local server in Java and linking it to an R environment through a socket connection. This alternative approach has been implemented in an R package called J4R. This article shows how this approach makes it possible to simplify the calls to Java methods and to integrate the R vectorization. The downside is a loss of performance. However, if the vectorization is used in conjunction with multithreading, this loss of performance can be compensated for.
Keyword:
Interoperability
Java local server
TCP/IP connection
R vectorization
Java Native Interface

期刊

PeerJ Computer Science 封面图
PeerJ Computer Science
IF:
2.5
论文数:
3.4K
被引数:
9.4K

机构

N
Natural Resources Canada
学者数:
143
论文数: 70
被引数: 3.7K
引用论文

引用论文

err分享
err收藏
err分享
err收藏
A novel nonlinear nano-scale wear law for metallic brake pads
err2018-01-01
err0
PREAI
errSandeep P. Patil; Sri Harsha Chilakamarri; Bernd Markert
err分享
err收藏
Nature relatedness: A protective factor for snake and spider fears and phobias
err2022-02-23
err0
errOAAI
errAndras N. Zsido; Carlos M. Coelho; Jakub Polák
err分享
err收藏
High-performance language interoperability for scientific computing through Babel
err2011-07-07
err17
errOAAI
errEpperly, Thomas G. W.; Kumfert, Gary; Dahlgren, Tamara; Ebner, Dietmar; Leek, Jim; Prantl, Adrian; Kohn, Scott
err分享
err收藏
没有更多内容