I am trying to script the installation of R 2.15.1 on Windows 7. R installs just fine, but I cannot figure out how to install multiple packages from the same batch script (
The odesolve package is depreciated and has been replaced by deSolve. R 2.15.1 is throwing an error when encountering this package. It could be causing problems for you. Here's a script I use for installing packages for new R installs.
libs=c("CircStats","coda","deldir","gplots","igraph","ks","odesolve","RandomFields")
type=getOption("pkgType")
CheckInstallPackage <- function(packages, repos="http://cran.r-project.org",
depend=c("Depends", "Imports", "LinkingTo", "Suggests", "Enhances"), ...) {
installed=as.data.frame(installed.packages())
for(p in packages) {
if(is.na(charmatch(p, installed[,1]))) {
install.packages(p, repos=repos, dependencies=depend, ...)
}
}
}
CheckInstallPackage(packages=libs)