Exercise 11: Interactivity

Exercise 11 — PMAP 8551/4551, Fall 2025

Author

Andrew Heiss

Published

November 3, 2025

Meet the Palmer Penguins!

Artwork by @allison_horst

Data description

This data for this exercise comes from Dr. Kristen Gorman and her team of researchers at Palmer Station, Antarctica, and it contains information on 344 penguins across three different Antarctic islands. The data was originally published in 2020 as the {palmerpenguins} package by Allison Horst and Alison Hill. Since then, it has become incredibly popular as a teaching and demonstration dataset, and starting with R version 4.5, it is included as one of R’s core built-in datasets as penguins.

There are 8 columns:

Variable Definition
species Species
island Island
bill_len Bill length (mm)
bill_dep Bill depth (mm)
flipper_len Flipper length (mm)
body_mass Weight (g)
sex Sex
year Study year
ImportantColumn names before R 4.5

This exercise assumes that you’re using R version 4.5+, which includes penguins automatically. If you’re using an older version of R, install the {palmerpenguins} package and change the code in the different tasks to this:

penguins <- palmerpenguins::penguins

Four of the column names in the older {palmerpenguins} data differ from the built-in names:

dataset::penguins (R 4.5+) palmerpenguins::penguins
bill_len bill_length_mm
bill_dep bill_depth_mm
flipper_len flipper_length_mm
body_mass body_mass_g

Bill length and bill depth

Here’s what bill length and bill depth refer to:

Artwork by @allison_horst