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'
Your error message is telling you that ggplot2 is not being installed because rlang is not being installed correctly. If this fails it may be because you do not have the necessary tools to build R packages from source.
Installing ggplot2 The ggplot2 package can be easily installed using the R function install. packages() . The above code will automatically download the ggplot2 package, from the CRAN (Comprehensive R Archive Network) repository, and install it.
ggplot2 package in R Programming Language also termed as Grammar of Graphics is a free, open-source, and easy-to-use visualization package widely used in R. It is the most powerful visualization package written by Hadley Wickham.
I restarted R, and it worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With