[R] Problem and Question regarding R
Thomas W Blackwell
tblackw at umich.edu
Sun Aug 31 21:11:10 CEST 2003
1) DO try building from source. For me it works painlessly
(Redhat 8.0 linux) and ./configure seems to be very good at
locating the resources it needs.
2) The very easiest, dumbest interface between Perl and R is
for Perl to write an ascii file of R commands - exactly what
one would type at the command line, including maybe
'object <- read.table("file.name")' to read in data from a
second file - then run this script as: R BATCH scriptfile outfile.
Wait for this to finish, then read outfile back into Perl.
I can't help with fancier methods, since I've never tried.
- tom blackwell - u michigan medical school - ann arbor -
On Sun, 31 Aug 2003, Bernhard Bals wrote:
> 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?
> Do you think I need or should compile and install R myself (not using
> one of the binary distributions)?
> 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"?
> Thanks's for your help!
> Dr. Bernhard Bals
> Dollmannstr. 6
> D-81541 München
> bbals at t-online.de
More information about the R-help