Introduction to R

R is a programming language and it is also called the language of data science. It is so popular for graphical computing and statistical analysis of data. It is commonly use to analyze and visualize data.

Why R:

1- R is open-source and free

2- It makes data visualization extremely easy. It is easy to draw graphs in R like scatter plots, box plots, histograms, pie charts, etc.

3- it makes data visualization, data science, and machine learning so simple.

4- Compatible with different operating systems (Windows, Linux, Mac)

5- 9000+ packages can make possible to anything with the data

6- Large community out there for support

How to install R on your local machine:

To download R click on the following link https://cloud.r-project.org/ and download the latest version of R for the particular operating system you are using, Windows, Mac, or Linux, and install it on your local machine.

After installation to run R you have to add the path or location of R to your system environment variables. To do so first copy the location in most of the cases even in my case the location is C:\Program Files\R\R-4.2.2\bin, but sometimes this path is different so you have to make sure that you are adding the correct path to your system environment variables.

To add the R path to system environment variables go to start and search for the system environment variable. when you will search you will see an option called Edit system environment variable on the top and you have to click on it.

When you will click on the option Edit system environment variable a window will pop up. On that window, you will see an option for Environment variables, then go to the path, and double click on it. Click on New and there past the copied path and save.

Now open the command line and run the command R.exe. you should see something same as the below screenshot, where I am adding 2 +2 and the output is 4 and printing “Hello world”

Leave a Reply

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