Using RserveClient, your Perl applications can pass strings to Rserve for evaluation by R. The results are returned as Perl objects.
The following code sets up a new connection to an Rserve server running on localhost, and sends to R the string
x='Hello, world!'; x.
use Statistics::RserveClient::Connection; my $cnx = new Statistics::RserveClient::Connection('localhost'); my @result = $cnx->evalString("x='Hello, world!'; x");
The result (the last value returned by R in the computation) is returned in an array. Additional examples can be found in the Examples section.
This library is packaged as a CPAN module ([http://www.cpan.org/]). The easiest way to install it is to run the command
cpan install Statistics::RserveClient
or equivalent on the machine where you wish to install the library. Additional details can be found in the Installation section.
This software was partially funded through the financial assistance of the University of British Columbia, via a Teaching and Learning Enhancement Fund project led by Dr. Bruce Dunham (UBC Statistics).
The author would also like to thank Dr. Davor Cubranic (UBC Statistics) for many improvements to the code, in particular most of the tests.