3

I have uninstalled R and Rstudio. When I originally downloaded Rstudio the package was not listed in the packages section, so I downloaded and imported the zip file. There is no current version of R that is 3.3.0 that I can find-- my R version is 3.2.2. I have tried to install using the RGui as admin and I get the same error.

This is my error:

Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : there is no package called ‘gtable’ In addition: Warning message: package ‘ggplot2’ was built under R version 3.3.0 Error: package or namespace load failed for ‘ggplot2’

lmo
  • 37,904
  • 9
  • 56
  • 69
  • 1
    Possible duplicate of [How should I deal with "package 'xxx' is not available (for R version x.y.z)" warning?](http://stackoverflow.com/questions/25721884/how-should-i-deal-with-package-xxx-is-not-available-for-r-version-x-y-z-wa) – zx8754 Feb 11 '16 at 20:01

1 Answers1

2

You are somehow executing R 3.3.0. No matter, though, you can simply invoke install.packages('ggplot2', repos='http://cran.rstudio.com', type='source') should sort you. If not, post a comment.

hd1
  • 33,938
  • 5
  • 80
  • 91
  • Added the command line and this is what I got. In addition: Warning message: package ‘ggplot2’ was built under R version 3.3.0 Error: package or namespace load failed for ‘ggplot2’ > install.package('ggplot2', repos='http://cran.rstudio.com', type=source) Error: could not find function "install.package" – Douglasscottsdsu Feb 06 '16 at 20:52
  • Additionally, > detach("package:ggplot2", unload=TRUE) Error in detach("package:ggplot2", unload = TRUE) : invalid 'name' argument > install.package('ggplot2', repos='http://cran.rstudio.com', type=source) Error: could not find function "install.package – Douglasscottsdsu Feb 06 '16 at 20:56
  • Thank you, much appreciated. After reading your command, I went directly through the repository install via Rstudio and that worked as well. – Douglasscottsdsu Feb 07 '16 at 23:20