Get Familiar with the Basics of R

0
7771

This article tells readers how to get their systems ready for R—how to install it and how to use a few basic commands.

R is an open source programming language and environment for data analysis and visualisation, and is widely used by statisticians and analysts. It is a GNU package written mostly in C, Fortran and R itself.

Installing R

Installing R is very easy. Navigate the browser to www.r-project.org and click on CRAN in the Download section (Figure 1).

This will open the CRAN mirrors. Select the appropriate mirror and it will take you to the Download section, as shown in Figure 2.

Grab the version which is appropriate for your system and install R. After the installation, you can see the R icon on the menu/desktop, as seen in Figure 3.

You can start using R by double-clicking on the icon, but there is a better way available. You can install the R Studio, which is an IDE (integrated development environment)—this makes things very easy. It’s a free and open source integrated environment for R.

Download R Studio from https://www.rstudio.com/products/rstudio/. Use the open source edition, which is free to use. Once installed, open R Studio by double-clicking on its icon, which will look like what’s shown in Figure 4.

The default screen of R Studio is divided into three sections, as shown in Figure 5. The section marked ‘1’ is the main console window where we will execute the R commands. Section 2 shows the environment and history. The former will show all the available variables for the console and their values, while ‘history’ stores all the commands’ history. Section 3 shows the file explorer, help viewer and the tab for visualisation.

LEAVE A REPLY

Please enter your comment!
Please enter your name here