Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Package 'ggplot2' not available for R version 3.5.1 [closed]

Tags:

r

ggplot2

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'
like image 690
Victoria Alexandra Lopez Avatar asked Sep 14 '18 02:09

Victoria Alexandra Lopez


People also ask

Why ggplot2 is not installing in RStudio?

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.

How can I install ggplot2 in R?

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.

What package is ggplot2 in R?

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.


1 Answers

I restarted R, and it worked for me.

like image 102
meghaljani Avatar answered Sep 30 '22 18:09

meghaljani