ggplot is showing error in my R console

While executing the below code ggplot(data=penguins,aes(x=flipper_length_mm,y=body_mass_g))+geom_point(aes(color=species))
I am getting below error
Error in ggplot(data = penguins, aes(x = flipper_length_mm, y = body_mass_g)) :
could not find function "ggplot"
Why I am getting this help me out on this

Before using the ggplot() function, you have to load the ggplot2 package. Run


That assumes that you have installed the ggplot2 package. If you have not, then run


You only need to do the installation once.

1 Like

Thanks now it is working