Choice Operators with Penguins (Making Choices)
If the file penguins.csv is not in your working directory then download it.
Load penguins.csv using read_csv().
Extract the species, island, and body_mass_g columns into vectors named species, island, and body_mass.
Use these vectors to print whether or not the following statements are TRUE or FALSE.
- The body mass of the first penguin is greater than 3500 g.
"Emperor"is inspecies.- The species of the first penguin is
"Adelie"or its body mass is greater than 4000 g. - The body mass of the second penguin is between 3700 and 3900 g.
- Each body mass is
NA. - For each observation either the
islandis"Torgersen"or thespeciesis"Gentoo".