I use a cluster (OS is Linux) which does not have R. I would like to install R
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?
I'm not sure this is on-topic, but: all you really have to do is
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)~/r_install
) somewhere sensible within your file spacecd
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; not technically necessary, as you can run R from the build directory)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 ...