Setting up my environment

Notes: setting up my environment by loading the ‘tidyverse’ and ‘palmerpenguins’ packages

library(tidyverse)
library(palmerpenguins)

Visualizations

Here we will go through a series of visualizations

Flipper and body mass in purple

Here, we will plot flipper length against body mass

ggplot(data=penguins,aes(x=flipper_length_mm,y=body_mass_g))+
  geom_point(color="purple")
## Warning: Removed 2 rows containing missing values (`geom_point()`).

Flipper and body mass by species

Here, we will plot flipper length against body mass and look at the breakdown by species

ggplot(data=penguins,aes(x=flipper_length_mm,y=body_mass_g))+
  geom_point(aes(shape=species))
## Warning: Removed 2 rows containing missing values (`geom_point()`).

Flipper and body mass by species and sex

Here, we will plot flipper length against body mass and look at the breakdown by species and sex

ggplot(data=penguins,aes(x=flipper_length_mm,y=body_mass_g))+
  geom_point(aes(color=species,
                 shape=species)) +
  facet_wrap(~sex)
## Warning: Removed 2 rows containing missing values (`geom_point()`).