stat545ubc-2020 / collaborative-helium

collaborative-helium created by GitHub Classroom
0 stars 0 forks source link

Error 2 fixed #27

Closed berudri closed 4 years ago

berudri commented 4 years ago

Fixing Error 2. There is only one error.

Before:

# ERROR HERE - 2
ggplot(penguins, aes(x = flipper_length_mm, y = body_mass_g)) +
  geom_smooth() +
  geom_point(method = "lm", se = TRUE) +
  theme_minimal() +
  labs(x = "Flipper Length (mm)",
       y = "Body Mass (g)")

After

# ERROR 2 fixed
ggplot(penguins, aes(x = flipper_length_mm, y = body_mass_g)) +
  geom_point() +
  geom_smooth(method = "lm", se = TRUE) +
  theme_minimal() +
  labs(x = "Flipper Length (mm)",
       y = "Body Mass (g)")
Tomiyosi-Bola commented 4 years ago

So method = "lm", se = TRUE are arguments of geom_smooth functions not geom_point Therefore, smooth was used in place of point.