$Id: R-Perl_install.txt 260 2007-04-20 16:30:44Z jari $ The following steps are important when using the BaseWebService perl module from R. 0. The BaseWebService.pm module requires the following modules to work: SOAP::Lite LWP::Simple 1. Installation of R (currently version 2.4.1) When running the configure script it is important that you specify the --enable-R-shlib option to the configure script in order to build a shared/dynamic library. 2. Installation of RSPerl (currently RSPerl_0.91-2.tar.gz) 2.1 Download the RSPerl package from http://www.omegahat.org/RSPerl/ 2.2 Normally one can install an R package directly using the tar archive, but now we need a script inside the archive. So, unpack this file (e.g. tar xvzf RSPerl_0.91-2.tar.gz). 2.3 We need to figure out what perl modules to link during compile time. For a discussion on this issue, see the FAQ.html at the top most directory. Enter the top most RSPerl directory (cd RSPerl) and issue the command unix>> perl -s modules.pl -modules Paste the output from this script into and file and enclose the line in double quotes. Also, add in the beginning of the line: export PERL_MODULES= Now paste this line into your unix shell and execute the command. We have now created the environment variable PERL_MODULES. 2.4 Leave the RSPerl directory and goto the directory where you have the archive (RSPerl_0.91-2.tar.gz) 2.5 Install RSPerl using the command (here you might have to be root if you have installed R as root) unix>> R CMD INSTALL RSPerl_0.91-2.tar.gz This should run quite fast. 2.6 Now test the RSPerl interface by starting R unix>> R R> library(RSPerl) This last command should run without error (you might get warnings). 2.7 If you get an error above you have to go back and try to delete some of the modules in the PERL_MODULES environment variable. The error message that you get might be helpful in order to figure out what modules to remove from PERL_MODULES. Then execute the new "export PERL_MODULES="..." expression and redo item 2.5-2.6. Hopefully it should now run without errors. 3. Testing the BaseWebService.pm module from R The websFunc.R file contains useful R functions that works as a simple wrapper for most of the methods in the BaseWebService.pm perl module. See the webs-test.R for an example of how to use these functions.