[R] Installing RSPerl and Statistics::R
ggrothendieck at gmail.com
Tue Jul 12 18:58:08 CEST 2005
On 7/12/05, Luc Vereecken <Luc.Vereecken at chem.kuleuven.ac.be> wrote:
> Hi list,
> For my research, I started using R as a statistics engine, driven by
> perl scripts that manage my data and computational jobs. I recently
> upgraded my cluster to Suse 9.2, and obviously wanted to upgrade R to
> it's latest version, 2.1.1. Installation of R-2.1.1 went flawlessly
> thanks to the rpm's created by Detlef Steuer (see cran, thanks Detlef).
> To interface perl and R, two packages are available: RSPerl and
> Statistics::R. Neither of the two installed out of the box, so I
> describe the problems here, as well as their solutions, for use by others.
> My scripts are based on a perl package Statistics::R, available from
> the perl CPAN in version 0.02. Installation of such a perl package is
> normally performed by doing:
> perl -MCPAN -e 'install Statistics::R'
> but the installation failed due to errors in the tests requiring me
> to ctrl-C the test program. I was able to force an install of this
> package by entering the CPAN shell:
> perl -MCPAN -e shell
> and executing a forced install:
> force install Statistics::R
> killing the test program halfway the install. Some investigation
> learned that Statistics::R as it is available at this time can not
> possible run as R is invoked as
> R --slave --vanilla --gui=none
> which used to work in older version of R, but the current versions no
> longer support --gui=none causing an error "ERROR: unknown GUI none".
> Strangely, invoking "R BATCH" sets the gui to none according to the
> manual, so either gui=none still exists internally but is simply no
> longer supported by the R script, or the R BATCH manual is not
> correctly updated.
> Statistics::R can be installed and made to work by using the forced
> install described above, and by editing the startup perl routines
> removing the gui=none option from the command line. This command line
> can be found in
> /usr/lib/perl5/site_perl/5.8.5/Statistics/R/Bridge/Linux.pm for my
> installation, it should be similar for other perl versions and
> RSPerl 0.7, available from www.omagahat.org/RSPerl/ , gives on it's
> main page the command
> R INSTALL -c -l <wherever> RSPerl_0.7-0.tar.gz
> R INSTALL -c -l <wherever> --configure-args='--with-in-perl'
> as installation command. In the "calling R from perl" PDF document,
> the command given is:
> R CMD INSTALL -c -configure-args='-with-in-perl' RSPerl
> None of these commands work due to typo's.
> A working command line is:
> R CMD INSTALL -c -l <installdir>
> --configure-args='--with-in-perl' RSPerl_0.7-0.tar.gz
> Hope this is of use to anyone,
> Luc Vereecken
I don't know the answer to your question and do all my analyses on
Windows rather than UNIX but I used to use perl for data processing
and another software for statistical analysis and what I really liked
about moving to R was that it is sufficiently powerful that I could eliminate
all my data processing perl code and replace it with much easier to
maintain R code so now everything is in one environment. You might
think about whether that is feasible for you too.
More information about the R-help