Problem in installing packages in latest version of R

Hi, everyone. I am new to the community and also to R. i was using R 3.6.3 with R studio (2022.02.1 Build 461). last week i updated R gui to 4.2. unfortunately, i uninstalled the previous version(3.6.3) now all packages are gone. now i can't install any of them. R gives me the following message. do i have to reinstall the previous version?

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'
Installing package into ‘C:/Users/HP/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)

Warning in install.packages :
package ‘metan’ is not available for this version of R

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.