Hi,
    I am trying to package an R script (that requires certain R packages) into a galaxy tool.  Any advice would be deeply appreciated!  

I have tested it on planemo and it works.  When I tried the version I uploaded onto the toolshed, I got an error saying that the R packages do not exist.  I next added the following lines to the R script:

source("https://bioconductor.org/biocLite.R")

biocLite()

biocLite(c("DNAcopy", "preprocessCore"))

and I got the following error when running the installed tool on galaxy:


Installing package(s) ‘DNAcopy’, ‘preprocessCore’
Warning in install.packages(pkgs = doing, lib = lib, ...) :
  'lib = "/usr/local/lib/R/site-library"' is not writable
Error in install.packages(pkgs = doing, lib = lib, ...) : 
  unable to install packages
Calls: biocLite ... .biocLiteInstall -> .reposInstall -> install.packages
Execution halted