Learn how to download and install R and RStudio on Windows or Mac. A simple step-by-step guide for beginners in data analysis, forecasting, and R.
If you are starting with data analysis, econometrics, or forecasting, one of the best tools to learn is R. It’s a free, open-source programming language widely used in academia, finance, and data science. To make the process easier, most people use RStudio, a powerful and user-friendly interface for R.
In this guide, you’ll learn exactly how to download and install R and RStudio on your computer so you can start running your first scripts today.
Why Use R and RStudio?
- R is the statistical engine: it runs your code, models, and data analysis.
- RStudio is the integrated development environment (IDE): it gives you a clean, organized workspace to write, test, and visualize results.
Together, they form one of the most popular setups for data analysts, economists, and students learning time series analysis in R.
Watch the Video Tutorial 🎥
For a step-by-step explanation, watch my full video tutorial on YouTube, or you can scroll down and read the article.
Step 1: Download and Install R
- Go to the official CRAN R download page.
- Select your operating system:
- Windows: click Download R for Windows.
- Mac: click Download R for macOS.
- For first-time installation, select base and then download the installer.
- Save the file and run the installer.
During installation:
- Choose your language (English is default).
- Accept the default destination folder.
- Keep the default options selected.
- Select “Create desktop shortcut” if you want quick access.
- Click Finish when done.
You now have R installed. ✅
Step 2: Download and Install RStudio
- Go to the RStudio download page.
- Choose the free version (RStudio Desktop).
- Download the installer for your system (Windows or macOS).
- Run the installer and follow the prompts:
- Click Next through the default steps.
- Accept default folders and settings.
- Click Finish once installation is complete.
Now search for RStudio on your computer. Right-click and Pin to taskbar (Windows) or add to Dock (Mac) for quick access.
Step 3: Open RStudio
When you open RStudio for the first time:
- It will detect your installed version of R.
- Select the default version.
- The RStudio interface will load with four panels: Console, Script Editor, Environment, and Plots.
To start coding:
- Go to File → New File → R Script.
- Type your first command, e.g.,
2+2
. - Press Run and see the result in the Console.
What’s Next?
Now that you’ve installed R and RStudio, you’re ready to:
- Import datasets into R.
- Run your first statistical analysis.
- Build forecasting models like ARIMA and VAR.
- Explore visualization and data science packages.
This setup is the foundation for more advanced tutorials in applied time series forecasting in R.
Learn More 🚀
If you want to take your skills further, check out my R — Applied Economics: Forecasting and Time Series Analysis Course. It’s designed for students, researchers, and professionals who want to master forecasting techniques step by step.
For more free resources, visit my website:
🌐 Forecasting Economics
Final Notes
- R = programming language.
- RStudio = user-friendly interface.
- Both are free to download and easy to install.
Keep your installation updated by checking the official websites for the latest versions.
Learn more How to Download and Install R and RStudio: Step-by-Step Guide