Package 'ggplot2' not available for R version 3.5.1

Viewed 17118

I am unable to install ggplot or ggplot2. I get this message:

install.packages("ggplot2")

Installing package into ‘C:/Users/Tori/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
Warning: unable to access index for repository https://cran.revolutionanalytics.com/src/contrib:
  cannot open destfile 'C:\Users\Tori\AppData\Local\Temp\Rtmp86X0fa\file3e7c476344e', reason 'No such file or directory'
Warning: unable to access index for repository https://www.stats.ox.ac.uk/pub/RWin/src/contrib:
  cannot open destfile 'C:\Users\Tori\AppData\Local\Temp\Rtmp86X0fa\file3e7c490b57', reason 'No such file or directory'
Error in gzfile(file, mode) : cannot open the connection
In addition: Warning messages:
1: package ‘ggplot2’ is not available (for R version 3.5.1) 
2: In gzfile(file, mode) :
  cannot open compressed file 'C:\Users\Tori\AppData\Local\Temp\Rtmp86X0fa/libloc_185_a25398df.rds', probable reason 'No such file or directory'
1 Answers

I restarted R, and it worked for me.

Related