WK-05 - Programming in R

Create your own loops and functions!

Workshop 5: Programming in R

This workshop focuses on basic programming in R. In this workshop, you will learn how to use control flow (for loops, if, while) methods to prevent code repetition, facilitate organization and run simulations. In addition, you will learn to write your own functions, and tips to program efficiently. The last part of the workshop will discuss packages that will not be covered elsewhere in this workshop series, but that may be of interest to participants.


Material

badge License: CC BY-NC-SA 4.0

Slides Book Script
English English English
Français Français Français

Note: The wiki for this workshop was converted to Bookdown in September 2021.
The wiki pages for this workshop will no longer be updated (Archive: EN, FR).


Contributors

This workshop was originally developed by Johanna Bradie, Sylvain Christin, Ben Haller, and Guillaume Larocque.

Since 2014, several QCBS members contributed to consistently and collaboratively develop and update this workshop, as part of the Learning and Development Award from the Québec Centre for Biodiversity Science. They were:

2022 - 2021 - 2020 2019 - 2018 - 2017 2016 - 2015 - 2014
Pedro Henrique P. Braga Gabriel Muñoz Johanna Bradie
Gabriel Muñoz Katherine Hébert Sylvain Christin
Kate Sheridan Pedro Henrique P. Braga Ben Haller
Parnian Pourtaherian Marie-Hélène Brice Guillaume Larocque
Pedro Henrique P. Braga
Sebastien Portalier
Jacob Ziegler
Zofia Taranu
Cédric Frenette Dussault