我想使用看起来像这样的Rprofile.site启动Rserve
.First <- function(){
library(Rserve)
Rserve(args="--RS-conf /usr/lib64/R/etc/Rserv.conf")
source("/usr/lib64/R/etc/InvestorToolBox.R")
}
Run Code Online (Sandbox Code Playgroud)
但是当我运行R时出现一些问题,它进入一个循环,它继续运行Rserve实例,如屏幕截图所示
启动Rserve:/ usr/lib64/R/bin/R CMD/usr/lib64/R/library/Rserve/libs // Rserve --RS-> conf/usr/lib64/R/etc/Rserv.conf
R版本3.2.3(2015-12-10) - "木制圣诞树"版权所有(C)2015统计计算平台的R基础:x86_64-redhat-linux-gnu(64位)
R是免费软件,绝对无保修.欢迎您在特定条件下重新分发它.输入"license()"或"license()"以获取分发详细信息.
自然语言支持,但在英语区域运行
R是一个与许多贡献者合作的项目.输入'contributors()'以获取更多信息,输入"引用()"以了解如何在出版物中引用R或R包.
为某些演示输入'demo()',为在线帮助输入'help()',或为HTML浏览器界面输入'help.start()'以提供帮助.输入'q()'退出R.
启动Rserve:/ usr/lib64/R/bin/R CMD/usr/lib64/R/library/Rserve/libs // Rserve --RS-> conf/usr/lib64/R/etc/Rserv.conf
R版本3.2.3(2015-12-10) - "木制圣诞树"版权所有(C)2015统计计算平台的R基础:x86_64-redhat-linux-gnu(64位)
R是免费软件,绝对无保修.欢迎您在特定条件下重新分发它.输入"license()"或"license()"以获取分发详细信息.
自然语言支持,但在英语区域运行
R是一个与许多贡献者合作的项目.输入'contributors()'以获取更多信息,输入"引用()"以了解如何在出版物中引用R或R包.
为某些演示输入'demo()',为在线帮助输入'help()',或为HTML浏览器界面输入'help.start()'以提供帮助.输入'q()'退出R.
启动Rserve:/ usr/lib64/R/bin/R CMD/usr/lib64/R/library/Rserve/libs // Rserve --RS-
conf/usr/lib64/R/etc/Rserv.conf
你能告诉我为什么或我做错了什么?
编辑: tl;博士你做错了.通过~/.Rprofile启动你会得到一个R进程来读取~/.Rprofile和启动......你得到自己的递归.简单的解决方法是使用Rserve它的使用方式.
一个人倾向于在R之外启动Rserve:
edd@max:~$ R CMD Rserve
R version 3.3.0 (2016-05-03) -- "Supposedly Educational"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
Rserv started in daemon mode.
edd@max:~$ pstree -p | grep Rserve
|-Rserve(24569)
edd@max:~$
Run Code Online (Sandbox Code Playgroud)
RServe有一些选项可以使用其特定的配置文件来设置特定的启动参数,身份验证选择等