Need Help?
Step 1: Download R
- Go to the R website:
Open your web browser and go to this website: https://cran.r-project.org. - Choose your operating system:
- If you are using Windows, click on “Download R for Windows.”
- If you are using Mac, click on “Download R for macOS.”
- If you are using Linux, click on “Download R for Linux.”
- Download the installer:
On the next page, find the latest version of R and click the link to download it.
Step 2: Install R
- Run the installer:
After downloading, find the file (usually in the Downloads folder) and double-click it to open. - Follow the setup wizard:
- Windows Users:
- Click Next on the first screen.
- Leave the default options as they are and keep clicking Next until you see Install. Click it to start the installation.
- Mac Users:
- Open the downloaded file and drag the R icon into the Applications folder.
- Linux Users:
- Follow the instructions on your screen or use the command terminal if prompted.
- Windows Users:
- Finish the installation:
Once the installation is done, click Finish (on Windows) or close the installer (on Mac/Linux).
Step 3: Install RStudio (Optional, but Recommended)
RStudio is an easier way to use R.
- Download RStudio:
Go to https://posit.co/download/rstudio-desktop/ and click “Download RStudio.” - Install RStudio:
- Follow the same steps as installing R.
Step 4: Open R or RStudio
- If you installed RStudio, open it from your Applications or Start Menu.
- If you only installed R, open the R program.
Step 5: Test R
- In the R or RStudio window, type this:
print("Hello, world!")
- Press Enter.
- If you see the message
Hello, world!
appear, R is working properly.