Federico Vegetti

random political research things

Introduction to data analysis and graphics with R (2012)

On the last year of my Ph.D. in Mannheim, I was asked to teach an introductory course to R for M.A. students, to run in parallel with the glorious Multivariate Analysis class that is one of the reasons for the impressive methodological skills of Mannheim graduates in Political Science. The class was meant to be an additional resource for students who were already taking the Multivariate class, so I was expressively asked to focus on the software, without spending too much time on the stats. Sessions were pretty long, almost 3 hours each.

The course was heavily based on the book "R in a Nutshell" by Joseph Adler, a great introductory text that made my life much easier in terms of preparation. Back in the day I wasn't using any of the packages developed by Hadley Wickham, like ggplot or dplyr, and almost everything was done using basic R functions. This was cumbersome at times, but it paid off in terms of language consistency, which helped students getting used to the syntax.

The introductory slides (one of my first attempts with LaTeX!) can be found here. All the scripts (plain R syntax files) can be downloaded from here. Data are available upon request.