Error in `geom_point()

ggplot(data=penguins,aes(X=flipper_length_mm,y=body_mass_g))+
geom_point(aes(color=species)) +
facet_wrap(~species)

BELOW IS THE ERROR I AM HAVING
Error in geom_point():
! Problem while setting up geom.
:information_source: Error occurred in the 1st layer.
Caused by error in compute_geom_1():
! geom_point() requires the following missing aesthetics: x
Run rlang::last_trace() to see where the error occurred.

CAN SOMEONE HELP TO RESOLVE THIS FOR ME. I AM NEW TO R.

r is case sensitive so x and X are considered different.
You wrote X=flipper_length when it should be x=flipper_length

2 Likes

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.