I am trying to execute a script installation of R 2.15.1 on Windows 7. R installs just fine, but I cannot figure out how to install several packages from the same script series (or any script package, for that matter). Below is the part of the script where I name a simple R file.
"%ProgramFiles%\R\R-2.15.1\bin\R.exe" CMD BATCH "%~dp0R packages for GME.R"
Here is the contents of the "R packages for GME.R", which contains packages for installation.
install.packages("CircStats","coda","deldir","gplots","igraph","ks","odesolve","RandomFields",dep=TRUE)
Given documented ownership and ACL issues with writing to the default library folder in Windows , I tried the following:
- Obtaining ownership of "C: \ Program Files \ R \ R-2.15.1 \ library", then starting
R CMD BATCH <file> (no change); - Granting Full Control permissions for my user account in the same folder, and then running
R CMD BATCH <file> (no change); - Changing the library folder to another location via Rprofile.site, then starting the
R CMD BATCH <file> (no change); - Running the command through Rgui
install.packages("CircStats","coda","deldir","gplots","igraph","ks","odesolve","RandomFields",dep=TRUE) (works).
So far, I have not been able to use CMD or batch scripts to install packages. Is there something I'm missing? Any alternative ways to install the script package would be greatly appreciated.
In addition, the machines that I will install are designed for multiple users, so systems and system configurations are preferred.
//
Edit 2012-11-06: Here is the error message from the .Rout file:
install.packages("CircStats","coda","deldir","gplots","igraph","ks","odesolve","RandomFields",dep=TRUE) Warning in install.packages("CircStats", "coda", "deldir", "gplots", "igraph", : 'lib = "coda"' is not writable Error in install.packages("CircStats", "coda", "deldir", "gplots", "igraph", : unable to install packages Execution halted
If I execute library(coda) after that, it gives Error in library(coda) : there is no package called 'coda' .