source: webservices/se.lu.thep.webservices/trunk/R-Perl_install.txt @ 1430

Last change on this file since 1430 was 260, checked in by Jari Häkkinen, 16 years ago

Fixed svn properties, 2nd try.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.5 KB
Line 
1$Id: R-Perl_install.txt 260 2007-04-20 16:30:44Z jari $
2
3
4The following steps are important when using the BaseWebService perl module
5from R.
6
70. The BaseWebService.pm module requires the following modules to work:
8   
9   SOAP::Lite
10   LWP::Simple
11
121. Installation of R (currently version 2.4.1)
13
14When running the configure script it is important that you specify the
15
16--enable-R-shlib
17
18option to the configure script in order to build a shared/dynamic library.
19
20
212. Installation of RSPerl (currently RSPerl_0.91-2.tar.gz)
22
23  2.1 Download the RSPerl package from http://www.omegahat.org/RSPerl/
24
25  2.2 Normally one can install an R package directly using the tar archive,
26      but now we need a script inside the archive. So, unpack this file
27      (e.g. tar xvzf RSPerl_0.91-2.tar.gz).
28
29  2.3 We need to figure out what perl modules to link during compile
30      time. For a discussion on this issue, see the FAQ.html at the top most
31      directory.
32 
33      Enter the top most RSPerl directory (cd RSPerl) and issue the command
34     
35      unix>> perl -s modules.pl -modules
36
37           
38      Paste the output from this script into and file and enclose the line in double
39      quotes. Also, add in the beginning of the line:
40     
41      export PERL_MODULES=
42
43      Now paste this line into your unix shell and execute the command. We
44      have now created the environment variable PERL_MODULES.
45
46  2.4 Leave the RSPerl directory and goto the directory where you have
47      the archive (RSPerl_0.91-2.tar.gz)
48
49  2.5 Install RSPerl using the command (here you might have to be root if
50      you have installed R as root)
51
52      unix>> R CMD INSTALL RSPerl_0.91-2.tar.gz
53
54      This should run quite fast.
55
56  2.6 Now test the RSPerl interface by starting R
57
58      unix>> R
59
60      R> library(RSPerl)
61
62      This last command should run without error (you might get warnings).
63
64  2.7 If you get an error above you have to go back and try to delete some
65      of the modules in the PERL_MODULES environment variable. The error
66      message that you get might be helpful in order to figure out what
67      modules to remove from PERL_MODULES. Then execute the new "export
68      PERL_MODULES="..." expression and redo item 2.5-2.6. Hopefully it
69      should now run without errors.
70
713.    Testing the BaseWebService.pm module from R
72
73      The websFunc.R file contains useful R functions that works as a simple
74      wrapper for most of the methods in the BaseWebService.pm perl module.
75      See the webs-test.R for an example of how to use these functions.
Note: See TracBrowser for help on using the repository browser.