This problem is caused by a change in R not RStudio. The R 4.2.0 changelog (link) says the following:
- The (non-default and deprecated)
method = "internal"
fordownload.file()
andurl()
no longer supports ‘http://’ nor ‘ftp://’ URIs. (It is used only for ‘file://’ URIs.)On Windows,download.file(method = "wininet")
no longer supports ‘ftp://’ URIs. (It is no longer the default method, which is"libcurl"
and does.)On Windows, the deprecatedmethod = "wininet"
now gives a warning for ‘http://’ and ‘https://’ URIs for bothdownload.file()
andurl()
. (It is no longer the default method.)
I've seen this on a corporate network and I can work around it by adding method = "wininet" when downloading packages eg install.packages("tidyverse", method = "wininet").
You'll get a warning but you should be able to use that until R4.3 comes out. Hopefully, we'll be able to get a fix before then.