G'day Rainer,
On Fri, 27 Feb 2009 14:06:20 +0200
Rainer M Krug <[email protected]> wrote:
> Thanks a lot for the offer - that would be great. I will set it up the
> same way on m y PC with Xubuntu.
Script is attached. Ignore the comments at the beginning they are
there just to remind me what ./configure line I usually use, possible
variations, and whether to edit config.site or work with environment
variables.
After the "make install" step, I edit in this file the variable VERSION
and PRIORITY and then ran the script as root. Note that VERSION should
be the same number as the one specified in the ./configure line.
As long as the the configuration of a command is set to 'auto', the
alternative with the highest priority is used. So make sure that the
newest version of R has highest priority, I usually set priority just
to xyz for R-x.y.z (and keep my fingers crossed that there will never
be a release with either y or z larger than 9, otherwise I will have
to refine my scheme).
To use this on a new machine, you have to create /opt/info,
/opt/man/man1 and /opt/bin before running the script the first time
(IIRC). It also helps to copy /opt/R/R-$VERSION/share/info/dir
to /opt/info/dir so that emacs will include the info files in the list
that you get with C-h i (this has to be done only once, the dir file
does not seem to change between R versions).
Prior to 2.5.0 the man and info files were installed in R-$VERSION/man
and R-$VERSION/info instead of R-$VERSION/share/man and
R-$VERSION/share/info, respectively. I have a separate script for those
versions (but don't install such old versions anymore). How far do you
want to go back? Also, much earlier, if memory serves correctly,
R-exts.info came in 2 parts instead of 3; but I don't seem to have my
script from that time anymore.
I think that's all. Let me know if you run into troubles or need more
help.
Cheers,
Berwin
#!/bin/bash
##Configure with the following options:
##
## ./configure --prefix=/opt/R/R-2.8.1 --with-blas --with-lapack
--enable-R-shlib r_arch=32
##
## other possible options:
## r_arch=32 and r_arch=64
## --enable-R-shlib
##
## export JAVA_HOME=/where/is/sun/java (/usr/lib/jvm/java-1.6-sun)
## above not necessary, use config.site instead.
##
##Then as root:
## VERSION=devel
## PRIORITY=100
VERSION=2.8.1
PRIORITY=281
update-alternatives --install /opt/bin/R R /opt/R/R-$VERSION/bin/R $PRIORITY \
--slave /opt/man/man1/R.1 R.1 /opt/R/R-$VERSION/share/man/man1/R.1 \
--slave /opt/info/R-FAQ.info.gz R-FAQ.info
/opt/R/R-$VERSION/share/info/R-FAQ.info.gz \
--slave /opt/info/R-admin.info.gz R-admin.info
/opt/R/R-$VERSION/share/info/R-admin.info.gz \
--slave /opt/info/R-data.info.gz R-data.info
/opt/R/R-$VERSION/share/info/R-data.info.gz \
--slave /opt/info/R-exts.info.gz R-exts.info
/opt/R/R-$VERSION/share/info/R-exts.info.gz \
--slave /opt/info/R-exts.info-1.gz R-exts.info-1
/opt/R/R-$VERSION/share/info/R-exts.info-1.gz \
--slave /opt/info/R-exts.info-2.gz R-exts.info-2
/opt/R/R-$VERSION/share/info/R-exts.info-2.gz \
--slave /opt/info/R-intro.info.gz R-intro.info
/opt/R/R-$VERSION/share/info/R-intro.info.gz \
--slave /opt/info/R-lang.info.gz R-lang.info
/opt/R/R-$VERSION/share/info/R-lang.info.gz \
--slave /opt/info/R-ints.info.gz R-ints.info
/opt/R/R-$VERSION/share/info/R-ints.info.gz
ln -sf /opt/R/R-$VERSION/bin/R /opt/bin/R-$VERSION
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.