1 Installing R and RStudio on Linux
You can just install the R-base package using the following code or Use your package manager to install R and R-studio.
1.1 Debian/Ubuntu/Linux Mint
apt-get install r-base (as superuser)
or
sudo apt-get install r-base
1.2 Install RStudio on Linux
Next comes installing RStudio. To install RStudio, go to download RStudio, click on the download button for the RStudio desktop, click the link for the latest R version for your OS, and save the .deb file.
Download the correct version of R-Studio from https://www.rstudio.com/products/rstudio/download/#download
apt install -f ./filename.deb (as superuser)
2 Install R on windows
Step – 1: Go to the CRAN R project website.
Step – 2: Click on the Download R for Windows link.
Step – 3: Click on the base subdirectory link or install R for the first-time link.
Step – 4: Click Download R X.X.X for Windows (X.X.X stands for the latest version of R. eg: 3.6.1) and save the executable .exe file.
Step - 5: Run the .exe file and follow the installation instructions.
- 5.a. Select the desired language and then click Next.
- 5.b. Read the license agreement and click Next.
- 5.c. Select the components you wish to install (it is recommended to install all the components). Click Next.
- 5.d. Enter/browse the folder/path you wish to install R into and then confirm by clicking Next.
- 5.e. Select additional tasks like creating desktop shortcuts etc. then click Next.
- 5.g. Click on Finish to complete the installation.
2.1 Install RStudio on Windows
Step – 1: With R-base installed, let’s move on to installing RStudio. To begin, go to download RStudio and click on the download button for the RStudio desktop.
Step – 2: Click on the link for the Windows version of RStudio and save the .exe file.
Step – 3: Run the .exe and follow the installation instructions.
- 3.a. Click Next on the welcome window. - 3.b. Enter/browse the path to the installation folder and click Next to proceed. - 3.c. Select the folder for the start menu shortcut, click on Do not Create shortcuts, and click Next. - 3.d. Wait for the installation process to complete. - 3.e. Click Finish to end the installation.
3 Installing R and RStudio on Mac OS X
To install R and RStudio on Mac OS X, go through the following steps:
3.1 Install R on Mac
Step – 1: Go to CRAN R Project Website.
Step – 2: Click the Download for (Mac) OS X link.
Step – 3: Click on the link for the pkg file of the latest R version and save it.
Step – 4: Double-click the downloaded file and follow the installation instructions.
3.2 Install RStudio on Mac OS X
Step – 1: With the r-base installed, you must install RStudio. To do that, go to download RStudio and click on the download button for the RStudio desktop.
Step – 2: Click on the link for the Mac OS X version of RStudio and save the .dmg file.
Step – 3: Double-click the downloaded file and then drag and drop it into your applications folder.