rserve

How to specify R CMD exec directory?

試著忘記壹切 提交于 2019-12-03 16:16:15
问题 Previously I have been able to start Rserve from the command line via: R CMD Rserve After upgrading to 3.0.2 on Ubuntu, I get: /usr/lib/R/bin/Rcmd: 62: exec: Rserve: not found I've tried reinstalling and launching manually via R > install.packages('rserve') > ...compiles successfully... > RServe() Starting Rserve: /usr/lib/R/bin/R CMD /home/user1/R/x86_64-pc-linux-gnu-library/3.0/Rserve/libs//Rserve ...which works fine. R CMD Rserve still fails with the same error as above. I've tried

Where is the Rserve Config file located on Windows?

為{幸葍}努か 提交于 2019-12-03 09:10:11
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 changed at compile-time) . But which working directory? I have checked the working directory of the

How to specify R CMD exec directory?

爷,独闯天下 提交于 2019-12-03 05:30:30
Previously I have been able to start Rserve from the command line via: R CMD Rserve After upgrading to 3.0.2 on Ubuntu, I get: /usr/lib/R/bin/Rcmd: 62: exec: Rserve: not found I've tried reinstalling and launching manually via R > install.packages('rserve') > ...compiles successfully... > RServe() Starting Rserve: /usr/lib/R/bin/R CMD /home/user1/R/x86_64-pc-linux-gnu-library/3.0/Rserve/libs//Rserve ...which works fine. R CMD Rserve still fails with the same error as above. I've tried specifying the path via: export RHOME="/home/jwiley/R/x86_64-pc-linux-gnu-library/3.0/Rserve/libs/" export R

How to start Rserve automatically from Java?

二次信任 提交于 2019-12-03 04:58:21
I am writing a Java application in IntelliJ IDE. The application used Rserve package to connect to R and perform some functions. When I want to run my code for the first time, I have to launch R in the command line and start the Rserve as a daemon, which looks something like this: R library(Rserve) Rserve() After doing this, I can easily access all the function in R without any errors. However, since this Java code would be bundled as an executable file, so is there a way that Rserve() is invoked automatically as soon as the code is run so that I have to skip this manual step of starting

Cannot open file '', reason No such file or directory

早过忘川 提交于 2019-12-02 09:00:59
I've run into the following problem, which sometimes happens when running the code in R under Rserve. So far I was unable to replicate this. I first create a PDF with pdf(file=paste(output.dir, "/dates_",name,".pdf",sep=""),width=6.25,height=9,title="Breakdown Dates:") and then plot the data: plot(time, data1, xlab="", ylab="") Most of the time it works, when it fails I get the error: cannot open file '', reason No such file or directory I've rerun this and debugged multiple times and all is working fine. However, sometimes in production it fails. Currently I suspect either the RServe or the

RServe share library code

江枫思渺然 提交于 2019-11-30 22:32:17
Is it possible that processes spawned by RServe share some common libraries loaded once into memory? Imagine that I need to execute bellow code on 100 different RConnections concurrently. library(libraryOfSize40MB) fun() It means that I need about 3.9GB of memory just to load library. I would prefer to load library once and then execute fun() one hundred times, so that I can run this on cheap host. Maybe this is helpful? https://github.com/s-u/Rserve/blob/master/NEWS#L40-L48 It is possible. You have to run RServe from R shell using run.serve preceded by loaded libraries: library(Rserve) #load

How can I shut down Rserve gracefully?

让人想犯罪 __ 提交于 2019-11-30 04:02:25
I have tried many options both in Mac and in Ubuntu. I read the Rserve documentation http://rforge.net/Rserve/doc.html and that for the Rserve and RSclient packages: http://cran.r-project.org/web/packages/RSclient/RSclient.pdf http://cran.r-project.org/web/packages/Rserve/Rserve.pdf I cannot figure out what is the correct workflow for opening/closing a connection within Rserve and for shutting down Rserve 'gracefully'. For example, in Ubuntu, I installed R from source with the ./config --enable-R-shlib (following the Rserve documentation) and also added the 'control enable' line in /etc/Rserve

Rserve的R语言客户端RSclient

左心房为你撑大大i 提交于 2019-11-29 19:16:12
R语言作为统计学一门语言,一直在小众领域闪耀着光芒。直到大数据的爆发,R语言变成了一门炙手可热的数据分析的利器。随着越来越多的工程背景的人的加入,R语言的社区在迅速扩大成长。现在已不仅仅是统计领域,教育,银行,电商,互联网….都在使用R语言。 要成为有理想的极客,我们不能停留在语法上,要掌握牢固的数学,概率,统计知识,同时还要有创新精神,把R语言发挥到各个领域。让我们一起动起来吧,开始R的极客理想。 关于作者: 张丹(Conan), 程序员Java,R,PHP,Javascript weibo:@Conan_Z blog: http://blog.fens.me email: bsspirit @gmail.com 转载请注明出处: http://blog.fens.me/r-rserve-rsclient/ 前言 RSclient是实现Rserve通信的R语言客户端程序,对于统计人员使用RSclient调用Rserve运行R语言脚本,感觉会很奇怪。但对于实际应用架构来说却是很有帮助的,不仅可以统一Rserve的接口,还可以从架构上实现R语言的跨虚拟机的分步式程序设计。 目录 Rserve和RSclient介绍 Rserve系统环境 RSclient安装 RSclient的API RSclient使用 两个客户端同时访问 1. Rserve和RSclient介绍 Rserve介绍

在Java中使用Rserve调用R

时光怂恿深爱的人放手 提交于 2019-11-29 19:16:00
昨天跟老师一起讨论之后得到了新的任务,讨论没得到什么结果,又收到了新的学习任务——在Java中调用R使用Rserve。 先介绍一下R R是一个用于统计计算和统计制图的优秀工具。其功能包括:数据存储和处理系统;数组运算工具(其向量、矩阵运算方面功能尤其强大);完整连贯的统计分析工具;优秀的统计制图功能;简便而强大的编程语言:可操纵数据的输入和输入,可实现分支、循环,用户可自定义功能 。 而Java语言是目前最流行的语言,所以今天尝试通过java来调用R函数为下面通过调用数学函数实现业务功能做基础。 目前我在32位windows7上做测试。 1. 首先需要下载R的windows安装程序,地址为 http://cran.r-project.org/ 然后安装就可以了。 2. 安装Rserve,可以通过R界面中的命令行输入:install.packages("Rserve")或者在R界面上选择:程序包->安装程序包,然后找到Rserve进行安装。 选择China(Hefei)服务器速度较快,China(BeiJing1)没有速度,安装完成之后就ok啦! 3. 启动 Rserve, 在 R 界面中的命令行中输入: library(Rserve) 来加载 Rserve ,然后输入 Rserve() 进行启动服务。 到此 Rserve 已经配置并启动好,下面轮到 Java 程序调用了。 1.

Rserve与Java的跨平台通信

岁酱吖の 提交于 2019-11-29 19:15:33
R的极客理想系列文章 ,涵盖了R的思想,使用,工具,创新等的一系列要点,以我个人的学习和体验去诠释R的强大。 R语言作为统计学一门语言,一直在小众领域闪耀着光芒。直到大数据的爆发,R语言变成了一门炙手可热的数据分析的利器。随着越来越多的工程背景的人的加入,R语言的社区在迅速扩大成长。现在已不仅仅是统计领域,教育,银行,电商,互联网….都在使用R语言。 要成为有理想的极客,我们不能停留在语法上,要掌握牢固的数学,概率,统计知识,同时还要有创新精神,把R语言发挥到各个领域。让我们一起动起来吧,开始R的极客理想。 关于作者: 张丹(Conan), 程序员Java,R,PHP,Javascript weibo:@Conan_Z blog: http://blog.fens.me email: bsspirit @gmail.com 转载请注明出处: http://blog.fens.me/r-rserve-java/ 前言 现在主流的异构跨平台通信组件 Apache Thrift 已经火遍大江南北,支持15种编程语言,但是到目前为止还没有加入R语言。要让R实现跨平台的通信,就只能从R的社区中找方案,像rJava,RCpp,rpy都是2种语言结合的方案,这些方案类似地会把R引擎加载到其他的语言内存环境。优点是高效,缺点是紧耦合,扩展受限,接口程序无法重用。 Rserve给了我们一种新的选择