微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

通过rJava / JRI在处理中使用R?

是否可以通过rJava / jri在Processing中运行R?如果我在网络上部署了一个Processing应用程序,客户端是否需要在他们的系统上使用R?

我正在寻找一个可以在网络上部署的交互式信息仪表板.对于互动/网络部分而言,Processing似乎是我最好的选择.不幸的是,它看起来并不像内置的许多数学/统计功能.并且没有任何用于绘制数据的库.

我一直在使用R和gpplot2几个月,我很高兴(惊讶)它操作和绘制数据的容易程度.

所以我现在想知道是否可以获得两全其美并通过Processing applet运行R.

来自JRI网站:

jri is a Java/R Interface,which allows to run R inside Java
applications as a single thread.
Basically it loads R dynamic library
into Java and provides a Java API to R
functionality. It supports both simple
calls to R functions and a full
running REPL.

In a sense jri is the inverse of rJava
and both can be combined (i.e. you can
run R code inside jri that calls back
to the JVM via rJava). The JGR project
makes the full use of both jri and
rJava to provide a full Java GUI for
R.

jri uses native code,but it supports
all platforms where Sun’s Java (or
compatible) is available,including
Windows,Mac OS X,Sun and Linux (both
32-bit and 64-bit).

感谢您的建议 :)

最佳答案
你能在Processing中编写Java代码(或访问Jar文件)吗?如果是这样,那么你绝对可以做到这一点. jri为R提供了一个低级接口,我还没有在R中遇到无法通过其功能运行的东西.

有关如何使用它的简单示例,请参见this related question.

除了看几次之外,我还没有真正使用过Processing,但我的理解是它有自己的语言.

原文地址:https://www.jb51.cc/java/437635.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐