First, you have to install R for R programming. For this, follow the below steps:
1. Go to cran.r-project.org
2. Download R for the operating system that you are using, i.e., Windows, Linux, or mac
3. Install R for getting all R packages
Next, you have to install RStudio, where you will be able to write all the R code. For this, follow the steps given below:
1. Go to rstudio.com
2. Click on ‘Download'
3. Scroll down, and you will get various versions of RStudio for different operating systems
4. Download RStudio as per your system requirements
5. Install RStudio and launch it for writing R codes
If you are looking for an online course to learn R programming, check out this R Programming Certification program by Intellipaat.