R Using Ubuntu Terminal
Installation R Studio

How To Install R in Windows and Ubuntu

This is a simple tutorial for install R in windows and Ubuntu. R is a programming language used for data analytics. It supports graphical representation of huge amount of data. Statistical analysis can be done easily through R. R has so many built-in function which support mathematical and data analytical operations on different types of data. R is actually a successor of language called ‘S language’.

Install R in Ubuntu

Installing R in Ubuntu(Linux) is quite simple. There are so many online R editors are available nowadays. Some of them are




So you don’t have to install R on your computer in order to run R programs. However it always depends on internet availability and browsing speed. R-base is the package which provide a software environment for statistical computing and graphics. Installing r-base on your computer will help you to do R programs offline. For that, you need to do the following  steps:

  1. open terminal using Alt+Ctrl+T or click on the ubuntu icon in the launcher and type terminal
  2. write sudo apt-get update
  3. sudo apt-get install r-base

For starting doing programs in R just type R in your terminal and it will start the R console or type R in your launcher icon and click on it. It will look like the image given below

R Using Ubuntu Terminal
R Console in ubuntu

Uninstall  R in Windows

  1. Open terminal using Alt+Ctrl+T or click on the ubuntu icon in the launcher and type terminal
  2. Type sudo apt-get –purge remove r-base   

Install R in Windows

Before installing IDE for R in windows  we need to install r. For that do the following steps

  1. www.r-project.org in your browser
  2. select CRAN mirror link form getting started
  3. choose a mirror location near your place
  4. select “Download R for windows” link
  5. select “install R for the first time”
  6. Select “Download R 3.5.1 for windows”(If you have any doubt installation instruction file is included in same page)
  7. Click on downloaded file (R-3.5.1-win.exe) and “Run” it.
  8. select language, Click Next
  9. agree on terms and conditions, Click Next
R installation in windows step10

10. Select location for installation, Click Next

R in windows
R installation in windows step 2

11. select components, Click Next

R installation windows component selection
select components of installation


12.  Select Startup options, Click Next

R installation windows start-up option selection selection
Start up option selection


13. Create Shortcuts in Start Menu

select start menu folder
Creating shortcuts in start menu

14. Start Installation

Start Installation of R
Start Installation of R in windows

15. Finish Installation by clicking Finish

Completing R installation
Completing R installation in windows


Uninstall R in windows follows same traditional way of windows. That is go to “control panel” select programs and features and uninstall it.

R Sample Code

Just write any arithmetic operations in R console like




To view the result stored in c, type “c” in your R console, It will display the result.

To install RStudio IDE in your system, go to this link given below

R studio Installation in Ubuntu and Windows


Leave a Reply

Your email address will not be published. Required fields are marked *