source(file.path(.libPaths(),"tools","R","tools")) # fix to .convertFilePathToAbsolute otherwise a ":" is postpended # to the dir name .convertFilePathToAbsolute <- function(dir) dir inst.packs <- function(pkgs,recmd=FALSE){ if(missing(pkgs)) pkgs <-c("base","ctest","eda","lqs","methods","modreg","mva","nls","splines","stepfun","tools","ts") if(recmd) pkgs <-c("boot","cluster","foreign","grid","KernSmooth","lattice","mgcv","nlme","rpart","survival","class","MASS","spatial","nnet") cat("doing package:") for( pp in pkgs){ cat(" ",pp) indir <- file.path(R.home(),"src","library",pp) outdir <- file.path(.libPaths(),pp) .installPackageIndices(indir, outdir) ns <- file.path(indir,"NAMESPACE") if(file.exists(ns)) file.copy(ns,file.path(outdir,"NAMESPACE")) .installPackageRdIndices(indir, outdir) } cat("\npackage installation completed\n") }