R Installation

Step-thro for installing R on Linux, Windows and Mac

Installing R on Linux

Because of write privileges on the clusters and most of the other SSG Linux machines, the instructions here will detail how to install a personal copy of R in your home directory. Before doing so, please check to see if the version of R you require is already globally available on that machine by typing which R. If R is available, typing R --version will list the version number of R available in your path. which R will work only if you already it is located at one of the globally added paths. You can refer to the Mechanical Engineering Cluster wikis to check where R has been installed. Alternatively, you could try peeking around in directories like /ibrixfs/apps,  /opt/ etc.

For a quick installation

  • Copy the tar.gz (Rxxx.tar.gz) in your home directory
  • Unzip and Untar it (use commands gunzip and tar)
  • Go to the directory that was created after uncompressing
  • Type the following ./configure --prefix=/where/you/want/it/to get/installed/ (The bin directory will be available here)
  • Then type make
  • Add the bin of the new R installation in your home directory to the path in your .bash_profile or .bashrc.

For a cleaner installation (from the R admin manual)

  • For more information related to this: http://cran.r-project.org/doc/manuals/R-admin.html
  • The source, build and installation directories can be separated to keep the installation clean. This is only if you're very finicky or particular about it
  • The directory obtained on untarring the initial tarball will be the source
  • Use mkdir to create separate build and installation directories (wherever u like)
  • cd to the build directory
  • type path/to/the/source/directory/configure --prefix=path/to/the/installation/directory
  • Type ' make '
  • Type ' make check ' to verify if there were errors
  • Type ' make install ' to install the complete R tree
  • Add the bin of the new R installation in your home directory to the path in your .bash_profile or .bashrc.
  • If you want to install all the R info pages, type 'make info' and 'make install-info'
  • R is now available at your/installation/directory/bin (not your build directory or the source directory)

Installing R on Windows

  • The newer windows installations come with a self-installer which is a breeze to run.
  • However, if you are plannning to install R from source on Windows, the process is more involved. A detailed, description is available at http://www.murdoch-sutherland.com/Rtools/. For the newer versions of R (like 2.5), a self-extracting installer is provided for the R tools. This installs most of the requisites. The description on the Rtools page has also been edited to make it much more clean and comprehensible. It should see you through the process fairly easily.
  • This page also used to have a clean description of the process for R 2.3.1 and earlier. However it seems to have been removed:. The link is here temporarily: http://www.biostat.jhsph.edu/~kbroman/Rintro/Rwinpack.html




Installing R on Macs

Labels

 
(None)