rserve

Rserve connection from local R client to Rserve host on AWS Server

假如想象 提交于 2019-12-12 15:09:34
问题 This question was migrated from Cross Validated because it can be answered on Stack Overflow. Migrated 5 years ago . Currently trying to connect to an Amazon AWS server via IP address on port 6311. I've set up Rserve as a daemon on the AWS server and have checked that it is in fact listening on port 6311 by calling the netstat command, but when I run the follow from my local R client: c <- RS.connect(host = "x.x.x.x") I get this error message: - cannot connect to x.x.x.x:6311 The local client

How to start rserve automatically from java in windows

自作多情 提交于 2019-12-12 05:14:29
问题 I have created a java application in eclipse. The application used Rserve package to connect to R and run r scripts. Before running my application, i have to start rserve from within Rstudio like this: library(Rserve) Rserve() This Java code would be bundled as an executable file, so is there a way that Rserve() is invoked automatically(in windows) as soon as the code is run so that I can skip this manual step of starting Rserve using through RStudio? 回答1: The https://github.com/yannrichet

Calling R from Java using RServe weird error

☆樱花仙子☆ 提交于 2019-12-11 11:18:01
问题 I have this code : import org.rosuda.REngine.Rserve.RConnection; public class TestProgram { public static void main(String[] args) { try { RConnection rConnection = new RConnection(); // make a new local connection on default port (6311) rConnection.eval("for(i in 1:.Machine$integer.max){}"); System.out.println("Done!"); } catch(Exception e) { System.out.println(e.toString()); } } } I get this exception : org.rosuda.REngine.Rserve.RserveException: eval failed, request status: error code: 127

how to use Rserve usage with PHP

风流意气都作罢 提交于 2019-12-11 08:27:17
问题 I have to run a script from php, getting the data from a from: Here is my script: library(pathview) pv.out <- pathview(gene.data = gene.d,gene.idtype = geneid,cpd.data = cpd.d,cpd.idtype=cpdid,pathway.id = pathway,species = species,out.suffix = suffix,kegg.native = kegg,sign.pos =pos,same.layer = layer,keys.align = align,split.group = split,expand.node = expand,multi.state=multistate,match.data = matchd ,node.sum=nsum,key.pos = kpos,cpd.lab.offset= offset,limit = list(gene = glmt, cpd = clmt)

Rserve - Multiple instances on one server?

≯℡__Kan透↙ 提交于 2019-12-10 15:58:53
问题 Is it possible to run multiple instances of Rserve on one server at the same time? For example 10 instances meaning 10 separate R workspaces listening on different ports via Rserve on the same machine? 回答1: Answer is yes, if it is Unix/Linux. Answer is no, if it is Windows. More can be found here http://www.ci.tuwien.ac.at/Conferences/DSC-2003/Proceedings/Urbanek.pdf, page 2 says it explicitly. 回答2: In the same document specified by @Oleksandr, it clearly states on page 5-6, that in Windows,

Rserve return type in case of multiple statements

邮差的信 提交于 2019-12-08 05:11:18
问题 Hi i dont quite understand the return type of Rserve in case of multiple command. eg. a<-rnorm(10);a[4];rnorm(3) it seems Rserve only returns the last evaluated statement,i.e. rnorm(3). Is it possible to get all the three output values with Rserve? Also i am interested to know how exactly in R can we get the return value of last evaluated expression? Is there a special character in R to get that like in perl? 回答1: This is normal R behavior, comparable to the behavior you get in a function.

Using node-rio from Meteor Server Side Route

…衆ロ難τιáo~ 提交于 2019-12-06 15:38:28
I'm trying to access an Rserve server using Meteor through a server side route to call R code. The Node.js module that allows access to Rserve is node-rio I have used the Async.wrap function in the meteorhacks:npm Meteor package to wrap the "evaluate" method. When I try to access the route path "/rio" in a browser, I get "1" written to the console log, which is correct for the evaluation of the command "1" in R, but Chrome hangs with the message "Waiting for localhost". It doesn't proceed to the next line and "Result: 1" is never shown. The message "net::ERR_EMPTY_RESPONSE eventually shows up

Rserve server: how to terminate a blocking instance (eval taking forever)?

若如初见. 提交于 2019-12-06 02:04:00
问题 I need to perform R eval s in a multi-threaded way, which is something Rserve provides quite well. But, if the eval of one instance takes too long, I need to be able to shutdown the instance which is computing the blocking eval. As far as I tested, the given instance will refuse to shutdown until the eval is done (apparently, it needs to fetch the result, before listening again). So here is my question: Is there a way get a java handle on the blocking instance (something like a Process object

Where is the Rserve Config file located on Windows?

依然范特西╮ 提交于 2019-12-04 14:44:14
问题 I'm using a Windows 7 x64 machine with R-3.1.0. I installed the Rserve package through Rstudio. The start of Rserve is successful with the following code in Rstudio: library(Rserve) Rserve() I got the following output: Starting Rserve... "C:\R\R-31~1.0\library\Rserve\libs\x64\Rserve.exe" My problem is that I couldn't locate the configuration file. Apparently it can't be "/etc/Rserv.conf". I did come across a webpage saying that the config file is Rserv.cfg in the working directory (unless

Rserve server: how to terminate a blocking instance (eval taking forever)?

≯℡__Kan透↙ 提交于 2019-12-04 05:31:10
I need to perform R eval s in a multi-threaded way, which is something Rserve provides quite well. But, if the eval of one instance takes too long, I need to be able to shutdown the instance which is computing the blocking eval. As far as I tested, the given instance will refuse to shutdown until the eval is done (apparently, it needs to fetch the result, before listening again). So here is my question: Is there a way get a java handle on the blocking instance (something like a Process object), such that I can brute force kill/terminate the eval (something like process.destroy() )? In other