EE BIOL C234

Practical Computing for Evolutionary Biologists and Ecologists

Author

Chuliang Song

Published

March 27, 2025

Weclome

Welcome to EE BIOL C234: Practical Computing for Evolutionary Biologists and Ecologists—or, as I like to say, a crash course in “computational Kung-Fu”.

Course Info

  • Where and When: We’ll be meeting Mondays and Wednesdays, 11:00 AM to 11:50 AM, in Botany 108.
  • Office Hours: Wednesdays, 3 PM to 4 PM, in Botany 210H.
  • The Grind: Yes, there will be weekly assignments (non-graded) and 3 PSETs. If you want to build computational muscle, you’re going to have to sweat a bit.
  • What to Bring: Just your laptop and a healthy dose of intellectual curiosity. If you have played with R before, great; if not, don’t worry—you’ll pick it up.
  • Course Material: This lecture note will be updated as the course progresses.

This is the inaugural run of this course for me. So if I’m losing you, boring you, talking too fast, too slow, whatever – speak up! Your feedback is my compass.

How to Use the Lecture Notes

Your left sidebar is your map to the course, showing all lectures—just a click away. On the right, you’ll see a table of contents specific to each lecture.

In this course, code examples will appear in blocks like this:

x <- 1+1
x^2
1
Calculate 1+1 and assign it to the variable x.
2
Calculate the square of x.

See the little circle on the right? Hover over it for a quick explanation of the code. When you hover over the code block itself, you’ll also spot a “copy” button—perfect for copying and pasting it into your R console to try it out yourself (fun fact: that’s how a large portion of coding is done in real life).

To show stepped progress, we’ll often add to existing code blocks. New additions are highlighted for clarity. For example:

x <- 1+1 
x^2 
x^3
1
Calculate the cube of x.

You’ll find key computational tools and R packages highlighted in purple (e.g., GitHub and ggplot2). R functions are indicated in red and always include parentheses, such as sum().

Throughout the course, expect tips, tricks, and even a few fun facts sprinkled in. While not essential, these extras might give you an edge or deeper insight. Some of them are collapsible, so you can click to expand and explore them at your own pace. Look out for these in green boxes, like this:

As advertised, this is a tips box.

I have included many exercises throughout the notes. These are your chance to practice what you’ve learned. Just fill in ____ with the correct answer and then run the code block to check your work. If you ever get stuck, the Solution is just next to it. For example,