Problem installing the dplyr package

Hello, I am new to R, and I am having trouble installing the "dplyr" package in RStudio. Would anyone be able to help?

I get this:

> install.packages("dplyr")
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/dplyr_1.0.5.tgz'
Warning in install.packages :
  cannot open URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/dplyr_1.0.5.tgz': HTTP status was '404 Not Found'
Error in download.file(url, destfile, method, mode = "wb", ...) : 
  cannot open URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/dplyr_1.0.5.tgz'
Warning in install.packages :
  download of package ‘dplyr’ failed

macOS Catalina 10.15.7
R version 4.0.4 (2021-02-15)
RStudio version 1.4.1106

Thank you in advance!

The installation seems to work when I manually input the URL location. I changed it from

https://cran.rstudio.com/bin/macosx/contrib/4.0/dplyr_1.0.5.tgz
to
https://cran.r-project.org/bin/macosx/contrib/4.0/dplyr_1.0.5.tgz
by finding it from

So now it works:

> install.packages("https://cran.r-project.org/bin/macosx/contrib/4.0/dplyr_1.0.5.tgz", repos = NULL)
trying URL 'https://cran.r-project.org/bin/macosx/contrib/4.0/dplyr_1.0.5.tgz'
Content type 'application/x-gzip' length 1251016 bytes (1.2 MB)
==================================================
downloaded 1.2 MB

Not sure why RStudio got a non-working URL, but hopefully this can help others if they see the same issue!

This topic was automatically closed 7 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.