i

R Programming Complete Tutorial

First R Program

Writing R code is very easy. First, open a new script from the file. It will initiate a new blank screen in the Script area. Than write R code in this section. We can execute this two ways:

1. To execute all the codes altogether, we have to use the Source button from Source Area.

2. To execute codes line by line, select the codes and press the Run button from Source Area.

We can try this using the following code block:

First R code: