[R-sig-Debian] Having both R-current and R-devel installed on Ubuntu

Dirk Eddelbuettel edd at debian.org
Wed Aug 8 23:22:47 CEST 2012


Hi Søren,

On 8 August 2012 at 20:38, Søren Højsgaard wrote:
| Dear List,
| 
| Having used R on Windows for years, I have recently installed Ubuntu as a virtual machine. I admit that I am quite new to the linux world.

Good :)  It's even better once you "host" on Linux as Linux is generally
better with limited resources.
 
| Installing R (current version = 2.15.1) went smoothly, but I would like to have both the current version of R and R-devel installed. I've searched the net for info on doing this but so far without luck.

I hope you found the README on CRAN to get you the prebuilt version. That is
the way many of us find most convenient to get "r-release" up and going.
 
| Can anyone help me getting this up and running?
| 
| A related question: How do I upgrade the current version of R to the patched versions?

R-devel and R-patched can only be had from source, and not from a .deb
because I never reorganised the packaging to allow for multiple versions.  

But because CRAN makes us check against R-devel, it is of use to have it.  So
I keep a svn checkout and every few weeks build locally via a little script
which carries over a few of the configuration choices I make for the Debian /
Ubuntu package (plus memory debugging from when Doug and I were chasing
something).  Followed by 'make install', this puts R into /usr/local/lib/R-devel
which is then completely off the PATH and does not affect normal R.

I then use this via a second script ~/bin/R-devel.sh which calls it. Also
below.

Hope this helps, Dirk


## --snip here ------------------------------------------------------------------------------
## ~/bin/build-R-devel

#!/bin/sh

cd ~/svn/r-devel

# R_PAPERSIZE=letter				\
# R_BATCHSAVE="--no-save --no-restore" 		\
# R_BROWSER=xdg-open				\
# PAGER=/usr/bin/pager				\
# PERL=/usr/bin/perl				\
# R_UNZIPCMD=/usr/bin/unzip			\
# R_ZIPCMD=/usr/bin/zip				\
# R_PRINTCMD=/usr/bin/lpr				\
# LIBnn=lib					\
# AWK=/usr/bin/awk                                \
# CC="ccache gcc"					\
# CFLAGS="-ggdb -pipe -std=gnu99 -Wall -pedantic -DTESTING_WRITE_BARRIER" \
# CXX="ccache g++"				\
# CXXFLAGS="-ggdb -std=c++0x -pipe -Wall -pedantic" \
# FC="ccache gfortran"				\
# FCFLAGS="-ggdb -pipe -Wall -pedantic"		\
# F77="ccache gfortran"				\
# FFLAGS="-ggdb -pipe -Wall -pedantic"		\
# MAKE="make -j4"					\
# ./configure 					\
#     --prefix=/usr/local/lib/R-devel 		\
#     --enable-R-shlib 				\
#     --enable-strict-barrier 			\
#     --with-blas 				\
#     --with-lapack 				\
#     --with-readline 				\
#     --without-recommended-packages

R_PAPERSIZE=letter				\
R_BATCHSAVE="--no-save --no-restore" 		\
R_BROWSER=xdg-open				\
PAGER=/usr/bin/pager				\
PERL=/usr/bin/perl				\
R_UNZIPCMD=/usr/bin/unzip			\
R_ZIPCMD=/usr/bin/zip				\
R_PRINTCMD=/usr/bin/lpr				\
LIBnn=lib					\
AWK=/usr/bin/awk                                \
CC="ccache gcc"					\
CFLAGS="-ggdb -pipe -std=gnu99 -Wall -pedantic" \
CXX="ccache g++"				\
CXXFLAGS="-ggdb -pipe -Wall -pedantic" 		\
FC="ccache gfortran"	 	  		\
F77="ccache gfortran"				\
MAKE="make -j4"					\
./configure 					\
    --prefix=/usr/local/lib/R-devel 		\
    --enable-R-shlib 				\
    --with-blas 				\
    --with-lapack 				\
    --with-readline 				\
    --without-recommended-packages

#CC="clang -O3"                                  \
#CXX="clang++ -03"				\


#make svnonly
make 

echo "*** Done -- now run 'make install'"




## --snip here ------------------------------------------------------------------------------
## ~/bin/R-devel.sh

#!/bin/bash

export R_LIBS_SITE=${R_LIBS_SITE-'/usr/lib/R-devel/lib/R/library:/usr/local/lib/R/site-library:/usr/lib/R/site-library::/usr/lib/R/library'}
export PATH="/usr/local/lib/R-devel/bin:$PATH"
R "$@"

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com  



More information about the R-SIG-Debian mailing list