One benefit of using R in the Ubuntu operating system is that Ubuntu repositories consist of R in it. You just need to install it using the below command:
>sudo apt install r-base
By this, you may get an older version of R. To install the latest version, you should visit cran.r-project.org. Here, you can download and install the latest version of R. Then, you can use a single command to run the console:
>R
In this R console, you can run R commands, and here are a few of the basic commands that you can run in the R console:
> 100+20
[1] 120
> print ("Hello R Programmers!")
[1] "Hello R Programmers!"
If you are looking for an online course to learn R programming, check out this R Programming Training by Intellipaat.