General Information

The first few years of grad school are a whirlwind, let alone the initial months! Coding is a skill that’s increasingly important for most graduate students in ecology & evolutionary biology, yet without formal instruction (who has time for that?), many of us end up learning enough to get by with an ad hoc approach (hello, stackoverflow). Winging it is good for some situations, but sometimes it’s worth it to learn skills that will increase your long-term efficiency and reproducibility (and, oftentimes, short-term too!) Example A: copying/pasting chunks of code might seem faster, but over time, this practice can make you vulnerable to errors, long analysis times, and difficulty sharing your code with others.

The purpose of today’s workshop is to give you the skills to write your own functions so that you can streamline your data analysis workflow. We will also describe some tools that we believe are well-worth getting to know, especially for those who are still in the early stages of coding.

This workshop will involve a combination of lecture and hands-on activities. A basic understanding of R is recommended because it will make the content more relevant and understandable, but even novices can listen and learn about the general concepts behind functions. Participants should use a computer with R already install using Mac, Linux, or Windows operating system (not a tablet, Chromebook, etc.).

Who: The course is aimed at new and intermediate learners of R.

When: November 23, 2021 @ 9:00-10:30 am EDT

Where: Virtual. https://utoronto.zoom.us/j/86435491946

Meeting ID: 864 3549 1946 Passcode: 656624

Requirements: Participants should use a laptop with a Mac, Linux, or Windows operating system (not a tablet, Chromebook, etc.) with administrative privileges. Ideally, two screens would be beneficial to see the video and your workstation at the same time. However, participation is not necessary and you can simply follow along as we demonstrate.

Contact: Please contact for more information.

Notes: Live Notepad

Schedule

(time in EDT)

Time Goal
9:00 Introduction and set-up
9:10 Functions
9:45 Break & Practice
10:00 Tips & Tricks
10:25 Wrap up

Past events: We have previously run a similar workshop at SORTEE 2021 and CSEE 2021.

Software

R is a programming language that is especially powerful for data exploration, visualization, and statistical analysis. To interact with R, we use RStudio.

Windows Mac OS X Linux
Install R by downloading and running this .exe file from CRAN. Please also install the RStudio IDE. Install R by downloading and running this .pkg file from CRAN. Please also install the RStudio IDE. You can download the binary files for your distribution from CRAN. Please also install the RStudio IDE

Packages we will be using: We recommend you install these ahead of time and ensure they load correctly to reduce troubleshooting in the workshop.

install.packages(c("here", "magrittr", "performance", "patchwork", "ggplot2", "dplyr", "tidyr", "remotes", "see"), dependencies = TRUE)
remotes::install_github("luisDVA/annotater")

We also encourage you to make a new R project for this workshop if you plan on coding along with us! Read this short introduction to R projects, courtesy of The Carpentries, and create an R project for this workshop by following a few simple steps under the “Challenge 1: Creating a self-contained project” section.

Other workshops

If you enjoyed this workshop and were interested in learning more, we have also run workshops on

Additionally, Alex has run these workshops:

You can find similar style workshops, usually that are longer and go into more detail, with The Carpentries. They have teachers available globally and cover all forms of programming beyond R.


Thank You!


Center for Urban Environments University of Toronto

Copyright © Alessandro Filazzola and Sophie Breitbart 2021