RSRuby 0.5

RSRuby is a bridge between Ruby and the R interpreted language.
RSRuby is a bridge between Ruby and the R interpreted language. When RSRuby is called in a Ruby script, a full R interpreter is embedded into the Ruby interpreter, allowing the Ruby script to call functions from any R library the user wishes.

Most data conversion is handled automatically, but user-definable conversion routines can also be written to handle any R or Ruby class.

RSRuby is a partial conversion of RPy, and shares the same goals of robustness, ease of use and speed. The current version is stable and passes 90% of the RPy test suite. Some conversion and method calling semantics differ between RPy and RSRuby (largely due to the differences between Python and Ruby), but they are now largely similar in functonality.

Major things to be done in the future include proper handling of OS signals, user definable I/O functions, improved DataFrame support and inevitable bug fixes.

Requirements:

R programming language
Ruby

INSTALLATION:

A working R installation is required. R must have been built with the '-enable-R-shlib' option enabled to provide the R shared library used by RSRuby.

Ensure the R_HOME environment variable is set appropriately. E.g.:

R_HOME=/usr/lib/R (on Ubuntu Linux)
R_HOME=/Library/Frameworks/R.framework/Resources (on OS X)

An RSRuby gem is available as well as a package using setup.rb. In each case the installation requires the location of your R library to compile the extension. This is usually the same as R_HOME. If you download the setup.rb package use these incantations:

ruby setup.rb config -- --with-R-dir=$R_HOME
ruby setup.rb setup
ruby setup.rb install

Using gems it is almost the same:

gem install rsruby -- --with-R-dir=$R_HOME

If RSRuby does not compile correctly you may need to configure the path to the R library, any one of the following should be sufficient:

Put the following line in your .bashrc (or equivalent):

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:RHOME/bin

or, make a link to RHOME/bin/libR.so in /usr/local/lib or /usr/lib, then run 'ldconfig'.

or, edit the file /etc/ld.so.conf, add the following line and then run 'ldconfig':

RHOME/bin

What's New in This Release:

Fixes a few bugs.
Also adds an RSRuby.img() method to make plotting to files a little more convenient.
No need to remember r.dev_off.call all the time.

last updated on:
April 28th, 2008, 1:24 GMT
price:
FREE!
developed by:
Alex Gutteridge
license type:
GPL (GNU General Public License) 
category:
ROOT \ Programming \ Interpreters

FREE!

In a hurry? Add it to your Download Basket!

user rating 17

UNRATED
3.4/5
 

0/5

Add your review!

SUBMIT