I use a cluster (OS is linux) which does not have R. I would like to install
R
Rscript example.R arg1 arg2
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)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 ...