Before you install RStudio, you need to install R. It is possible to have multiple versions of R installed side by side. RStudio will use the latest version by default, but can be configured to use a different installed version.
RStudio needs at least R version 2.11, but we highly recommend you to install the latest version.
To download and install R, point your browser to www.r-project.org, click on Download R (in the text underneath the graphics), and choose a server near where you are. From there, follow the instructions in the Download and install R box. Alternatively, use the Download R! button at www.inside-R.org. This website automatically offers you the most recent R version fitting your computer and operating system.
Automatic R installation is supported for several popular Linux flavors, including Debian, OpenSuse, and Ubuntu.
For OpenSuse, the default installation can be obtained by pointing your web browser to http://software.opensuse.org/search, search for r-base
, and install from there. At the moment, the newest R version is available from there.
The R version offered by the package installer is frozen when the operating system is released. We assume that you are familiar enough with tools such as Synaptic
or aptitude
in order to install the R version that comes with those operating systems. Here, we provide some details on how to install the latest R version on Ubuntu or Debian.
CRAN hosts Debian and Ubuntu repositories, which are as follows:
Add the repository for Ubuntu 12.04 (precise pagnolin) by adding (as root) the following line to your
/etc/apt/sources.list
file:deb http://<your_nearest_cran_mirror>/bin/linux/ubuntu precise/
Replace
<your_nearest_cran_mirror>
with a server near where you live. A list of mirrors can be found at http://cran.r-project.org/mirrors.html. Next, register the security key by typing the following:sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
Type the following commands to install the
R.sudo
apt-get update:sudo apt-get install r-base
Alternatively you can install the latest R now via Synaptic. For Debian 6.05 (squeeze), the line to add to your /etc/apt/sources.list
file is deb http://<your_nearest_cran_mirror>/bin/linux/debian squeeze-cran/
.
The security key is installed with the following command:
sudo apt-key adv --keyserver subkeys.pgp.net --recv-keys 381BA480
After this, installation proceeds as in Ubuntu.