How to install RStudio IDE in Ubuntu?


RStudio is an Integrated Development Environment (IDE) for the R. It includes different tools like source code editor, builds automation, debugger.

R is a programming language and free software environment that is used for statistical computing and graphics. This language is heavily used in the fields of data visualization, data analysis, and data science.

In this article, I will show you how you can set up RStudio IDE in Ubuntu.

Prerequisites

  • A system with a recent version of Ubuntu (here I will use Ubuntu 20.04 LTS) installed on it.
  • You should have the access to a user account with superuser privilege.
  • Install a recent version of R on your system (For example RStudio Desktop 1.4.1717 requires R 3.0.1+)

Download RStudio

RStudio Desktop (open source license) that we are going to install here is available in free and free-based commercial editions. At the time of writing this article, RStudio Desktop 1.4.1717 is the latest version of RStudio Desktop.

To install it on your Ubuntu system first go to the download page of RStudio and then click on the .deb package installer for recent Ubuntu, if Ubuntu 20 is not available download it for Ubuntu 18.

download installer rstudio

OR use the given command in your terminal to download the installer.

wget https://download1.rstudio.org/desktop/bionic/amd64/rstudio-1.4.1717-amd64.deb

Now you can see the downloaded package by using the given command –

ls

ls

Install RStudio on Ubuntu

Before you install RStudio on your Ubuntu system, first use the given command to update the local package database –

sudo apt update

and then use –

sudo apt -y install r-base gdebi-core

If R is already installed on your system then don’t use r-base in the above command.

Now use the given command to install the RStudio from the deb file.

sudo gdebi rstudio-1.4.1717-amd64.deb

If it asks you for confirmation press y and then enter.

Start RStudio on Ubuntu

To Launch the RStudio IDE first go to the Activities dashboard search for RStudio when the icon appears click on it to start.

launch rstudio

Alternatively, you can start it from your terminal by using –

rstudio

This will open that application you can see its user interface in the given image.

rstudio user interface

You can start using it for writing your R code. Now if you have a query then write us in the comments below.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.