Steps to Install R Studio on Ubuntu

Installing R Studio on Ubuntu has steps similar to Windows: 

Using Terminal 

Step 1: Open terminal (Ctrl+Alt+T) in Ubuntu.

Step 2: Update the package’s cache. 

sudo apt-get update

Step 3: Install R environment. 

sudo apt -y install r-base

Check for the version of R package using

R --version

Step 4: Check R installation by using the following command. 

user@Ubuntu:~$ R 

(Note that R version should be 3.6+ to be able to install all packages like tm, e1071, etc.). If there is issue with R version, see the end of the post. 

Step 5: Exit the terminal.

Using Ubuntu software Center 

Step 1: Open Ubuntu Software Center.

Step 2: Search for r-base.

Step 3: Click install. 

Steps to Install Rstudio on Ubuntu  

Step 1: Install gdebi package to install .deb packages easily.

sudo add-apt-repository universe
sudo apt-get install gdebi-core

Step 2: Go to R Studio downloads and select the latest *.deb package available under Ubuntu 18/Debian 10.

Step 3: Navigate to the Downloads folder in the local machine.

$ cd Downloads/
$ ls
rstudio-1.2.5042-amd64.deb

Step 4: Install using gdebi package.

sudo gdebi rstudio-1.2.5042-amd64.deb

Step 5: Run the RStudio using Terminal

user@Ubuntu:~/Downloads/ $ rstudio 

Alternatively, use the menu to search for Rstudio.

Step 6: Test the R Studio using the basic “Hello world!” command and exit.

Input  : print('Hello world!') 
Output : [1] "Hello world!"

Alternatively, RStudio can be installed through Ubuntu Software as well, but using the above approach generally guarantees the latest version is installed. 

If there are issues with the R version getting downloaded or the previously installed version is older, check R version with 

R --version

Now, Run the following commands in Terminal (Ctrl + Alt + T)  

Add the key to secure APT from the CRAN package list:

sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9

Add the latest CRAN repository to the repository list. (This is for Ubuntu 18.04 specifically):

sudo add-apt-repository ‘deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/’

Update the package cache:

sudo apt update

Install the r-base package:

sudo apt install r-base

How to Install R and R Studio?

Navigating the R language installation process and setting up R Studio is crucial for anyone looking to delve into data analysis, statistical computing, and graphical representation with R. In this article, we provide a step-by-step guide on how to install R and configure R Studio on your system. Whether you’re a beginner taking your first steps in R programming or an experienced data analyst looking to optimize your workflow, mastering the installation process ensures you have the tools needed to harness R’s full potential. Join us as we simplify the setup, ensuring you’re ready to start coding and exploring the vast capabilities of R for your data-driven projects.

Similar Reads

Why use R Studio?

R Studio is preferred for several reasons:...

How to Download R and R Studio?

To Install R and R Studio on Windows we will have to download R and R Studio with the following steps....

Steps to Install R and R Studio

Step 1: After downloading R for the Windows platform, install it by double-clicking it....

Steps to Install R Studio on Ubuntu

Installing R Studio on Ubuntu has steps similar to Windows:...

Conclusion

R Programming Language, coupled with R Studio, offers a robust environment for statistical computing and data analysis. Installing R and R Studio on different platforms like Windows and Ubuntu involves downloading the necessary files and following a few simple steps, ensuring a smooth setup process....

Install R and R Studio – FAQs

How to Download RStudio for Windows 10 free?...