Guides for R and RStudio
R and RStudio
R is a programming language designed to help you perform statistical analysis, create graphics, and later on write your own statistical software. R is becoming increasingly popular and knowledge of R will help you in the job market. R is probably the most versatile statistical tool out there (and its free and open source so you can literally use it anywhere).
RStudio is a great graphical user interface for R and will be the program which we will use during the lab sessions. In recent years, a growing number of features have been added to this graphical user interface, which makes it the preferred choice for learning R, especially among beginners. You can think about it as R being the engine of the car and RStudio being the dashboard.
Guides & Troubleshooting
You can find troubleshooting advice and quick guides for problems and frequently asked questions on R and RStudio.
How to install R
- Open your browser and go to https://cran.rstudio.com.
- Download the latest release distribution (4.5.1 as of July 2025) for your operating system (OS):
- Windows users: Click on Download R for Windows and then click on base. Click on Download R 4.5.1 for Windows.
- Mac users: Click on Download R for (Mac) OS X and download
R-4.5.1.pkg.
- Run the installation from the file you just downloaded (
.exeor.pkg). - Now that
Ris installed, you need to download and install RStudio.
How to install RStudio
- Go to www.rstudio.com and click on the Download button on the top bar.
- Scroll down and click on the Download button for the free RStudio Desktop version.
- Download the latest version for your operating system:
- Windows users: Click on the button Download RStudio for Windows. The file should have a
.exeextension. - Mac users: Click on Download RStudio for (Mac) OS X. You should see a
.dmgextension.
- Windows users: Click on the button Download RStudio for Windows. The file should have a
- Install it!
Additional resources
- Hertie School Data Science Summer School 2021/22/23: Amazing tutorials in English from a top German University. The tutorials cover topics from introduction to
R, visualizing data inR, to more advanced topics like webscraping withR. You can work on many skills and applications ofRonce you are comfortable with the basics. You can freely watch the full tutorials on Youtube but also access the course materials here, here and here. - R for Data Science, by Hadley Wickham & Garrett Grolemund: This is one of the most popular books to learn
Rfrom scratch. - Stat545, Jenny Bryan: A complete and detailed
Rcourse, STAT 545, based on a course teached by Jenny Bryan at the University of British Columbia. - Introduction to Econometrics in R: We cover a lot of topics referred to in this book (available as a website) but it may serve you as a supplemental source of information and a starting point to expand your expertise in specific topics following the course.