I have installed ggplot and ggplot2 and their dependencies, but I cannot use the function ggplot; whenever I try to use it I get
ggplot
Error in gg
Try:
library(ggplot2)
Even after installing a package, you have to load a package each time you load R.
This question is answered comprehensively in the r-faq:
Error: could not find function ... in R