Teaching Statistics with R in Mexico

Graduate and Post-graduate, Instituto Potosino de Ciencia y Tecnologia, 2019

I consider myself a passionate advocate for R. This programming language is a potent tool. Thus, in the mid of my PhD when I was invited to organise an R-workshop in Mexico by my former colleague Antonio Rodriguez de León, I didn’t think twice. In this post, I will share my experience and the strategies I used to make the material engaging and accessible to the students.

When planning the sessions, I tried to make them aesthetically appealing. When you experience beauty, you feel pulled towards the source. I am aware that, for a biologist, the command line interface can be pretty cold, so it could be an excellent way to attract them towards the R suite. Moreover, visual representations help to grasp abstract concepts such as functions, tables, matrices, etc. Then, I divided the workshop into three lessons with a theoretical part and a practical part each.

The first session focused on introducing the students to R and its basic concepts. We covered R-objects, vectors, lists, dataframes, functions, and special operators (for, if, and so on). Finally, we did a practical on a sample dataset so that the students could get hands-on.

The workshop’s second session focused on data exploration via plotting and statistical comparison. I consider data plotting one of the strongest points of R. Thus, I put particular emphasis on highlighting the value of data visualisation to generate hypotheses and data exploration. Indeed, I remember quite well at that time, I was reading the science history book “Microbe Hunters” by Paul de Kruif. There, the chapter on David Bruce showed how plotting the location of patients with sleeping disease on a map helped him to find the source of the disease: the tsetse fly, which lives near lakes and other humid areas. The statistical comparison was a more advanced topic, but the students could grasp the material quite quickly, thanks to the strong foundation they had built in the first session. During the second session, we again did practical exercises to reinforce what the students had learned. We worked through examples of linear models and statistical comparisons, using real-world data sets to illustrate the concepts. This helped the students to see how the material they were learning could be applied in practical situations.

The third and final session of the workshop focused on model trouble-shotting, generalised linear models, and generalised additive models. This last item is not common, but it was a special request from my colleague because the institute was interested in using non-linear surfaces to model multiple variable experiments.

Overall, Teaching these workshops was an incredible learning experience for me, and I’m grateful for the opportunity to share my knowledge with others.

You can take a look at the slides here, here and here, or go directly to the github where I also included the datasets and practice scripts.