I just got a new Macbook, and I've downloaded R and Rstudio. But for some reason, I can't install any packages in R studio. It all shows the same error:
Warning in install.packages :
unable to access index for repository http://cran.rstudio.com/src/contrib:
cannot open URL 'http://cran.rstudio.com/src/contrib/PACKAGES'
I've tried to check R options, but it seems alright:
getOption("download.file.method") [1] "libcurl"
I've also unchecked the "Use secure download method for HTTP" option under Tools -> Global Options -> Packages. and my CRAN mirror is shown "Global (CDN) - RStudio"
and here's the version I'm using:
version _
platform x86_64-apple-darwin15.6.0
arch x86_64
os darwin15.6.0
system x86_64, darwin15.6.0
status
major 3
minor 5.3
year 2019
month 03
day 11
svn rev 76217
language R
version.string R version 3.5.3 (2019-03-11) nickname Great Truth
Warning in install.packages :
unable to access index for repository https://cloud.r-project.org/src/contrib:
cannot open URL 'https://cloud.r-project.org/src/contrib/PACKAGES'
Warning in install.packages :
unable to access index for repository https://www.stats.ox.ac.uk/pub/RWin/src/contrib:
cannot open URL 'https://www.stats.ox.ac.uk/pub/RWin/src/contrib/PACKAGES'
Even tho this is shown as a warning message only, but when I try to actually use this package, it pops a real error message as following:
> library(dplyr)
Error in library(dplyr) : there is no package called ‘dplyr’
And I've already turned off all firewalls on my Mac. I've search a lot of similar questions online, but seems like no real fix to it. Has anyone run into this error before? How did you fix it? Please send help! Thanks a lot!