I realized that the problem has to do with the .Rprofile
file. This is what I have in that file:
options(repos="http://cran.stat.ucla.edu")
utils::update.packages(ask=FALSE)
pkgs <- getOption("defaultPackages")
options(defaultPackages = c(pkgs,"ggplot2","arm", "Zelig","stringr", "plyr", "reshape2", "MatchIt", "ISLR", "rgdal"))
Whenever ggplot2 loads from .Rprofile
, I get the error mentioned in my question above. Whenever I take out ggplot2 from the .Rprofile
options, I don't get the error.