I can't install packages

I can't install packages
please help me

Can you please be more specific? What packages? What is the command you are using? What is the error message you are getting?

Firstly, thanks for your interest
I'm trying to install tidyverse
I use this command: install.packages("tidyverse")

and I get this message:
Warning in install.packages :
unable to access index for repository https://cran.rstudio.com/src/contrib:
cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES'
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/hany/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)
Warning in install.packages :
unable to access index for repository https://cran.rstudio.com/src/contrib:

cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES'
Warning in install.packages :
package ‘tidyverse’ is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages

Warning in install.packages :
unable to access index for repository https://cran.rstudio.com/bin/windows/contrib/4.1:
cannot open URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/PACKAGES'

I am sorry for parting the message I get, as I am a new user and not allowed to share more than 2 links in one reply
Thanks again

About the link restriction, you can avoid that issue by posting the console output as formatted code instead of normal text.Here is how to do it

About your installation problem, this seems like a connectivity issue, R is not being able to connect to the CRAN repository you have selected, these are some things to try.

  • Choose a different CRAN repository, RStudios repository is a good choice (http://cran.rstudio.com/) or you could choose one that is geographically closer to you.
  • Disable secure download setting.
  • Check if your internet connection has traffic restrictions of some kind, like a firewall, proxy server, etc. This is usually the case when you are at work or school.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.