These sessions provide an introduction to coding in R and Python. The aim is to get you comfortable with coding techniques commonly used in scientific research.
Learning objectives
Get familiar with the R or Python programming language
Learn to visualise data
Be able to manipulate and transform data
Target audience
This course is aimed at people without any prior programming experience. It does however, allow people with some experience to further enhance their knowledge through different level exercises.
Prerequisites
No prerequisites.
Exercises
Exercises in these materials are labelled according to their level of difficulty:
Level
Description
Exercises in level 1 are simpler and designed to get you familiar with the concepts and syntax covered in the course.
Exercises in level 2 combine different concepts together and apply it to a given task.
Exercises in level 3 require going beyond the concepts and syntax introduced to solve new problems.
Citation & authors
Please cite these materials if:
You adapted or used any of them in your own teaching.
These materials were useful for your research work. For example, you can cite us in the methods section of your paper: “We carried our analyses based on the recommendations in YourReferenceHere”.
You can cite these materials as:
Tavares, H., van Rongen, M. (2025). Data analysis in R and Python. https://cambiotraining.github.io/data-analysis-in-r-and-python/
Or in BibTeX format:
@misc{YourReferenceHere,
author = {Tavares, Hugo and van Rongen, Martin},
month = {6},
title = {Data analysis in R and Python},
url = {https://cambiotraining.github.io/data-analysis-in-r-and-python/},
year = {2025}
}
About the authors:
Hugo Tavares Affiliation: Cambridge Centre for Research Informatics Training Roles: writing - original draft; conceptualisation; software
Martin van Rongen Affiliation: Cambridge Centre for Research Informatics Training Roles: writing - original draft; conceptualisation; software
Acknowledgements
Some parts of these materials are loosely based on the original course contents of the “Data Carpentry lesson in Ecology”, as released by Michonneau et al. (2019).
Michonneau, François, Tracy Teal, Auriel Fournier, Brian Seok, Adam Obeng, Aleksandra Natalia Pawlik, Ana Costa Conrado, et al. 2019. “Datacarpentry/r-Ecology-Lesson: Data Carpentry: Data Analysis and Visualization in r for Ecologists, June 2019.” Zenodo. https://doi.org/10.5281/zenodo.3264888.