Thursday, December 23, 2010

Rserve

ruby rserve client


$ sudo gem install rserve-client
$ irb
>> require 'rserve'
>> a = Rserve::Connection.new

>> y = a.eval('2 + 2').to_ruby
=> 4.0


http://www.rforge.net/Rserve/doc.html

http://www.rforge.net/Rserve/files/

download the current osx binary, then install using a command similar to:


$ R CMD INSTALL /Users/eabolden/Downloads/Rserve_0.6-3.tar


Get the source code, not the OSX binary if you are using R64.







$ R CMD INSTALL /Users/eabolden/Downloads/Rserve_0.6-3.tar

Start Rserve with the command

$ R CMD Rserve

R version 2.12.1 (2010-12-16)
Copyright (C) 2010 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-apple-darwin9.8.0/x86_64 (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.

View Rserve settings


$ R CMD Rserve --RS-settings
WARNING: ignoring environment value of R_HOME
Rserve v0.6-3

config file: /etc/Rserv.conf
working root: /tmp/Rserv
port: 6311
local socket: [none, TCP/IP used]
authorization required: no
plain text password: not allowed
passwords file: [none]
allow I/O: yes
allow remote access: no
control commands: no
interactive: yes
max.input buffer size: 262144 kB



Note:

If no config file is supplied, Rserve accepts no remote connections, requires no authentication and file transfer is enabled. For more details about how to configure Rserve, see below.

Configuration
Rserve is configured by the configuration file /etc/Rserv.conf (can be changed at compile time by specifying -DCONFIG_FILE=..). Additional configuration files can be added by the --RS-conf command line argument. The possible configuration entries are as follows (all entries are optional; default values are in angled brackets):










No comments:

Post a Comment