Hi!
Can someone please help me fix the issue "Caused by an error in `FUN()" ? Reading the error messages, but I don't find the mistake that occurred with my code though.
Here is the error message:
Error in geom_smooth()
:
! Problem while computing aesthetics.
Error occurred in the 1st layer.
Caused by an error in FUN()
:
! object 'x' not found
Below is what I coded:
library(ggplot2)
library(palmerpenguins)
ggplot(data = penguins)+
-
geom_smooth(mapping = aes(x=flipper_length_mm,y=body_mass_g))