Remi.b Remi.b - 1 year ago 143
Linux Question

How to install R on a linux cluster?

I use a cluster (OS is linux) which does not have R. I would like to install

in my personal folders so that I can just do

Rscript example.R arg1 arg2

How should I install R on this cluster knowing that I don't have admin rights?

How can I then manage the packages?

Answer Source

I'm not sure this is on-topic, but: all you really have to do is

  • download the R source tarball from CRAN; unpack it somewhere in your file space
  • create an r-build directory at the same level of the hierarchy (not technically necessary, but it's better practice to keep the source and build directories separate)
  • create an installation directory (say ~/r_install) somewhere sensible within your file space
  • cd to the source directory; tools/rsync-recommended
  • cd to the build directory
  • ../[srcdir]/configure --prefix=~/r_install
  • make (to build the binaries)
  • make install (to move everything where it belongs)

Where this may get hairy is with all of the system requirements for R (LaTeX, Java, bzip2, etc. etc. ...) it is theoretically possible to download all this stuff and install it in your own file space, but it starts to get sufficiently tedious that it will be easier to beg your sysadmin to install at least the dependencies for you ...

as @Hack-R points out the basics of this answer are already present on Unix & Linux stackexchange, although my answer is a little more detailed ...

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download