Rserve是我一直比较看好的一个服务器/客户端程序,它可以方便地和其他程序交互,如Java、C++等。下面是它的介绍:
Rserve is a TCP/IP server which allows other programs to use facilities of
R (see
www.r-project.org) from various languages without the need to initialize
R or link against
Rlibrary. Every connection has a separate workspace and workingdirectory. Client-side implementations are available for popularlanguages such as C/C++ and Java.
Rserve supports remote connection, authentication and file transfer. Typical use is to integrate
R backend for computation of statstical models, plots etc. in other applications.
The following Java code illustrates the easy integration of
Rserve:
Rconnection c = new Rconnection();<br />
double d[]=c.eval("rnorm(10)").asDoubleArray();
d now contains 10 random samples from the N(0,1) distribution if there is a runing
Rserve on the local machine. The Rconnection doesn't have to be created more than once in your application.
我对Java程序开发不熟,连如何使用那个Java客户端都不知道[s:12]
Rserve还有很多其它功能,如传输文件等。希望有熟悉程序开发的useR能全面介绍一下,谢谢[s:11]