Reputation: 1057
I have installed ggplot and ggplot2 and their dependencies, but I cannot use the function ggplot
; whenever I try to use it I get
Error in ggplot ... could not find function "ggplot"
Upvotes: 34
Views: 81858
Reputation: 72731
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
Upvotes: 57