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:
- open terminal using Alt+Ctrl+T or click on the ubuntu icon in the launcher and type terminal
- write sudo apt-get update
- 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
Uninstall R in Windows
- Open terminal using Alt+Ctrl+T or click on the ubuntu icon in the launcher and type terminal
- 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
- www.r-project.org in your browser
- select CRAN mirror link form getting started
- choose a mirror location near your place
- select “Download R for windows” link
- select “install R for the first time”
- Select “Download R 3.5.1 for windows”(If you have any doubt installation instruction file is included in same page)
- Click on downloaded file (R-3.5.1-win.exe) and “Run” it.
- select language, Click Next
- agree on terms and conditions, Click Next
10. Select location for installation, Click Next
11. select components, Click Next
12. Select Startup options, Click Next
13. Create Shortcuts in Start Menu
14. Start Installation
15. Finish Installation by clicking Finish
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