clean <- read.csv("data/processed/penguins_clean.csv")
# keep one species: filter out Adelie and Chinstrap
gentoo <- subset(clean, species == "Gentoo")Penguin body mass
Data
After removing incomplete rows, there are 333 penguins in the data. 119 of them are Gentoo penguins, which is the species we look at here.
Results
The mean body mass of Gentoo penguins was 5092 g.
aggregate(body_mass ~ sex, data = gentoo, FUN = mean) sex body_mass
1 female 4679.741
2 male 5484.836
boxplot(body_mass ~ sex, data = gentoo, ylab = "Body mass (g)")