I can't seem to get downloaded packages into the right place so that they work. I open the RGui as administrator and type:
install.packages("ggplot2", lib="C:/Program Files/R/R-3.2.2/library")
it returns:
The downloaded binary packages are in
C:\...path...Temp\RtmpcLuCYn\downloaded_packages
which is not the place it should have gone to which is the first problem. So I try to load the package from this location:
library(ggplot2, lib.loc="C:/...path...Temp/RtmpcLuCYn/downloaded_packages")
and it returns:
Error in library(ggplot2, lib.loc = "C:/...path...Temp/RtmpcLuCYn/downloaded_packages") :
there is no package called ‘ggplot2’
so I figure let's try just loading from where I told it to put the file:
library(ggplot2, lib.loc="C:/Program Files/R/R-3.2.2/library")
unsurprisingly this didn't work, it returned:
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘Rcpp’
Error: package or namespace load failed for ‘ggplot2’
I have no idea why it sends the download to a temp location but it seems reasonable that this is the cause of the problem. I have administrator access. I have also tried:
adding "C:/Program Files/R/R-3.2.2/library" as an environment variable
adding R_LIBS_USER to user variables with the value 'C:/Program Files/R/R-3.2.2/library'
just downloading with the command:
install.packages('ggplot2')
the errors and returns are identical
Any further advice would be much appreciated.