Plotting grafic result
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")