从rclient超时卡中调用rserve

时间:2016-04-10 05:11:08

标签: r

我们如何从rsclient调用rserve?在服务器端,我们有一个需要从rsclinet调用的函数。任何rseval调用都被卡住 - 添加了“control-enable”标志但仍然无效。感谢

    Kindly find below sample code

    1. Server side - "rserve" 
    library(Rserve)
    Rserve(port=6311,args="--RS-enable-control --RS-enable-remote --RS-settings")

    2. Function present on server side as rscript - D:/axa/rsource/rsource/Functionaddition.R
   sumFunc=function()
   {
      print("function invoked")
      return(10)
    }


    3. Client (Rstudio) invoke function ("sumFunc")
       library("RSclient")
       c<- RSconnect(host = "localhost", port = 6311)
       source <-RSserverSource(c,"D:/axa/rsource/rsource/Functionaddition.R")
       RSserverEval(c,"z()")

0 个答案:

没有答案