我无法在调试模式下启动 Rserve。我在 R 中编写了这些命令:
library(Rserve)
Rserve(debug=T, args="RS-enable-control", quote=T, port = 6311)
library(RSclient)
c=RSconnect(host = "localhost", port = 6311)
RSeval(c, "xx<-12")
RSeval(c, "2+6")
RSeval(c, "xx")
RSclose(c)
install.packages("fpc")
我将 Rserve_d.exe 放在 R.dll 文件所在的同一目录中。但是,当我启动它并使用 Rserve 连接启动 Tableau 时,我在调试控制台中看不到任何内容,只有这几行。
Rserve 1.7-3 () (C)Copyright 2002-2013 Simon Urbanek
$Id$
Loading config file Rserv.cfg
Failed to find config file Rserv.cfg
Rserve: Ok, ready to answer queries.
-create_server(port = 6311, socket = <NULL>, mode = 0, flags = 0x4000)
INFO: adding server 000000000030AEE0 (total 1 servers)
我通过 R 中的命令 Rserve(TRUE) 尝试了另一种解决方案,但在 Rstudio 控制台中也看不到 R 和 Tableau 之间的事务。
然后我想通过 print(.arg1) 从 R-script 函数打印 R 中变量的输出。但是 R 控制台中没有出现任何内容,但是当我在 R 控制台中运行 print 时,它工作正常。