rserve

Plot() error when using REngine.Rserve

隐身守侯 提交于 2019-11-29 11:57:24
I'm now work on a project which wants to use org.rosuda.REngine.Rserve to use facilities of R by C#. I have a particular problem that when I run the following code in C# client side: c.eval("pdf(file=\"plots.pdf\", width=11, height=8.5)"); c.eval("plot(1,2)"); An error occour which said Error in plot.new():cannot open file '', reason No such file or directory But I checked that the file "plots.pdf" has already been created successfully by "pdf.." function. In R semantics, the successive plot() will output figure to the active device opened by the "pdf(...)" function, i.e. "plots.pdf" this time

Simple program to call R from Java using Eclipse and Rserve

与世无争的帅哥 提交于 2019-11-28 17:16:59
My application must perform R operations such as: m = matrix(sample(0:1,100, rep=T),ncol=10) The results should be available to a Java application. The Rserve package bridges R to other languages, since it acts as a TCP/IP server. I've read the website but don't know how to make the simplest application that can use Rserve. What steps are required to make a simple Eclipse application that uses Rserve to execute R commands from Java? Alina There is a binary version of Rserve in the download section (www.rforge.net/Rserve/files/ I have version R 2.13 and Windows xp, so I need download Windows

Simple program to call R from Java using Eclipse and Rserve

穿精又带淫゛_ 提交于 2019-11-27 10:34:25
问题 My application must perform R operations such as: m = matrix(sample(0:1,100, rep=T),ncol=10) The results should be available to a Java application. The Rserve package bridges R to other languages, since it acts as a TCP/IP server. I've read the website but don't know how to make the simplest application that can use Rserve. What steps are required to make a simple Eclipse application that uses Rserve to execute R commands from Java? 回答1: There is a binary version of Rserve in the download

Store large data or a service connection per Flask session

≯℡__Kan透↙ 提交于 2019-11-25 21:53:33
问题 I\'m writing a small Flask application and am having it connect to Rserve using pyRserve. I want every session to initiate and then maintain its own Rserve connection. Something like this: session[\'my_connection\'] = pyRserve.connect() doesn\'t work because the connection object is not JSON serializable. On the other hand, something like this: flask.g.my_connection = pyRserve.connect() doesn\'t work because it does not persist between requests. To add to the difficulty, it doesn\'t seem as