Unable to load packages in RStudio

Hey,
I am a student at Ghent University and we have some assignments where we have to use R in RStudio. To start, we have to load some packages. The "pastecs" package works fine for example but then I want to install the package "psych" by:
if(!require(psych)){install.packages("psych")}
and it gives following error:

Loading required package: psych
also installing the dependency ‘mnormt’

Warning in install.packages :
unable to access index for repository https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6:
cannot open URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/PACKAGES'
Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘mnormt’
Do you want to attempt to install these from sources? (Yes/no/cancel)

If I answer "yes" it doesn't work either. Thanks in advance!

This is on MacOS Catalina

Dag @FrederikP: There have been problems with the CRAN repositiories for MAC updating correctly, so I would recommend opening the R app (not RStudio) directly, and running install.packages(), with no arguments. That will create an interactive call which allows you to pick 1) where you'd like to get your packages from, and 2) which package you'd like to install. Some locations are fine, and others aren't, but it's not clear which, so I would recommend starting with ones close by (Ghent), and seeing what works.

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