[R] Problem and Question regarding R

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Sun Aug 31 21:04:53 CEST 2003


bbals at t-online.de (Bernhard Bals) writes:

> Hi,
> 
> I'm just about to install the Precompiled Binary Distribution of R
> from CRAN for SuSE Linux 8.2: R-base-1.7.1-1.i386.rpm
> 
> My system is SuSE Linux 8.2 Professional Edition on a Pentium 4:
> 
> # uname -a
> Linux linux 2.4.20-4GB #1 Mon Mar 17 17:54:44 UTC 2003 i686 unknown
> unknown GNU/Linux
> 
> 
> 1) Problem:
> 
> I've tried to install the above base rpm archive with the command:
> 
> # rpm -i R-base-1.7.1-1.i386.rpm
> error: failed dependencies:
>          libg2c.so.0 is needed by R-base-1.7.1-1
> 
> There seems to be only one dependency missing (hope that's all). Since
> I've installed the Professional Edition with all the compilers and
> libraries, it's maybe only a naming problem.
> 
> What's behind this missing library?
> Can this problem be fixed with a symbolic link pointing to a library
> that I already have on my system?
> Any experience with that?

As far as I remember, this happens if you haven't installed the
Fortran compiler (g77) since libg2c is part of that.
 
> Do you think I need or should compile and install R myself (not using
> one of the binary distributions)?

Wouldn't help (except in the sense that it would become more obvious
that a Fortran compiler is needed!)

> 
> 2) Question:
> 
> I want to use R not only interactively (issue commands after the
> prompt > ..), but also use some functionality of R from a Perl script.
> 
> Can I use methods of R from a Perl script: Is there an interface from
> Perl (or at least from C/C++) to R (f.e. invoke R functions from Perl,
> C, C++ or some other language)?
> If so, can you please point me to the documentation on the Web or in
> literature where this is decribed?
> Do you have some demo Perl script (or C/C++ program) that uses this
> technique, f.e. calling R methods like "mean" or "standard deviation"?

http://www.omegahat.org/RSPerl . Be warned that these Omegahat packages
are sometimes not quite as stable as the regular CRAN family of
packages so some patchups can be required. Or maybe it will all just
work...  

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list