Below is a makefile I wrote to download and install all available R packages
from the CRAN and BioConductor package repositories.  

The primary advantage of using this makefile instead of R's built-in
install.package() and update.packages() is the creation of a separate
installation log for every package.   Further, if make is invoked with '-k',
failure to install a single package will not derail the installation of
other packages.

I hope that this script may be useful to other folks.  

-Greg

# Download and install all available R packages from the CRAN and
Bioconductor 
# package repositories
#
RCMD ?= R-1.9.0
WGET ?= wget -N -nd -r -A gz -r -l 1 -nv

PACKAGE_FILES = $(wildcard *.gz ) 
PACKAGE_LOGS  = $(addsuffix .log, $(basename $(basename $(PACKAGE_FILES))))

default: cran bioconductor install

cran: 
        $(WGET) "http://cran.r-project.org/src/contrib/PACKAGES.html";

bioconductor: bioCmain bioCcontrib bioCdata

bioCmain:
        $(WGET)
"http://www.bioconductor.org/repository/release1.3/package/html/index.html";

bioCcontrib:
        $(WGET) "http://www.bioconductor.org/contrib/index.html";

bioCdata:
        $(WGET) "http://www.bioconductor.org/data/metaData.html";

install: $(PACKAGE_LOGS)

%.log: %.tar.gz
        $(RCMD) INSTALL $< > [EMAIL PROTECTED] 2>&1 
        mv [EMAIL PROTECTED] $@



LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to