Most cluster nodes are not equipped to install software. Usually there is a 'head' node or similar that can be used to install packages into a location that the nodes then use; you'll have to speak with your cluster help desk / system administrator to find out the local details.
So the easiest way is to use an identically configured machine that is attached to the internet and that has the libraries, headers, compilers, etc., required to install software. Create a directory ~/R/cluster-lib/R-3.2_Bioc-3.1/ and ensure that it is the only directory R knows how to install packages to, perhaps with .libPaths("~/R/cluster-lib/R-3.2_Bioc-3.1/")
. Use biocLite() to install libraries, then make ~/R/cluster-libs available to the cluster, and to R on the cluster (by again using .libPaths() or the environment variable R_LIBS_USER).
You can also create a small repository and install from there. Do this by setting up a package repository
dir.create("/tmp/my/src/contrib", recursive=TRUE)
pkgs = <your packages>
avail = available.packages(contrib.url(BiocInstaller::biocinstallRepos()))
deps = tools::package_dependencies(pkgs, avail, recursive=TRUE,)
download.packages(unique(c(pkgs, unlist(unname(deps)))), "/tmp/my/src/contrib",
repos=biocinstallRepos())
tools::write_PAKCAGE("/tmp/my/src/contrib")
then install on cluster nodes using install.packages(pkgs, repos="file:///tmp/my")
.
If you are a system administrator wanting to enable your users, consider making a local mirror of CRAN and Bioconductor
http://cran.r-project.org/mirror-howto.html
http//bioconductor.org/about/mirrors/mirror-how-to/
and arrange for your users to install from there. Mirror only the src/contrib part of the repositories. This will be expensive initially, but easy to keep up-to-date via a cron script.