Introduction to R

Period of duration of course
‌‌
Course info
Number of course hours
20
Number of hours of lecturers of reference
20
CFU 3
‌‌

Modalità esame

Final research note

Prerequisiti

Participants will gain most from this course if they have followed courses in quantitative methods before and/or have specific use cases in mind related to their own research.

Programma

This course is an introduction to the programming language R. It focuses on hands-on applications, rather than statistical or mathematical background and is therefore open to students at all levels of quantitative skills. R is not a software package in the traditional sense, but a programming language with a wide range of potential applications, from standard statistical analysis, to data management and visualization, to web scrapping and even text processing. The course will use R Studio, a free user interface for R. In a first part, we will cover issues of data management and data wrangling using base R and the tidyverse family of tools, the basics of R programming, as well as data visualization using the grammar of graphics package (ggplot2). Each session consists of an introduction to the topic, followed by practical exercises. Participants should thus make sure to install R and R Studio before the first class. In the second part of the course, we will move to more specific applications, focusing in particular on ways in which R can complement other software packages with which students might be familiar (in particular STATA). While R has a somewhat steep learning curve, it does provide more flexibility and adaptability (in addition to being free for users). We will start the second part by replicating published analyses employing standard regression approaches, learning how to implement such techniques in R, but also how to efficiently present the results in graphical as well as tabular form. Additional elements to be covered in the second part of the course will be determined in coordination with participants based on their interest. By the end of the course, participants will be able to independently implement basic data management and analysis tasks in R

Obiettivi formativi

Participants will:

  • acquire basic skills in data management and visualization in R
  • learn basic R programming
  • gain familiarity with the tidyverse and ggplot2 packages
  • learn how to implement various types of statistical analysis in R
  • understand use cases of R beyond statistical analysis proper