Plotting grafic result I am learning how to plot data. I am trying to obtain this grafic result on my dataset. The thing is, I can't do it. The cool plot is from a kaggle's kernel, which code is: 

ggplot(cocoa,aes(x=pct, y=rating)) +geom_point(aes(colour=factor(location))) +
  theme( legend.position="bottom",legend.key.width=unit(0.2,"cm"),legend.key.height=unit(0.2,"cm")) +
  xlab("Cocoa Percent(%) ") + ylab("Chocolate Bar Rating") +
  ggtitle("Scattor plot of Cocoa Percent vs Chocolate Bar Rating") 


When I try to install "ggplot" on RStudio, it says Error in install.packages : object"ggplot" not found. So I tryied copying the text in plot() function. Obviously, it gives me errors on the arguments. 
The only thing I managed to do is this:

plot(data=chocolate, Rating~CocoaPerc, xlab="Rating", ylab="Cocoa Percentage", col="brown", 
     main="Valutazione e Percentuale di cacao")


Can anybody help me achieving the cool result? Or can you advise me any other "tricks" or guides about data plotting and grafic study of datasets? Thanks
You probably did:

install.packages(ggplot)


This is a common mistake: when installing a package you need quotes, otherwise R interprets the name of the package as a string and since the string isn't defined you get an "object not found" error. The correct version is:

install.packages("ggplot")


(with single or double quotes, it doesn't matter)

Note: I would normally use the ggplot2 package, but maybe ggplot redirects to the same package:

install.packages("ggplot2")