Cannot install packages on IOS

Hello, I am a new R user. I am currently trying to install packages on my mac (macOS Mojave).

Warning in install.packages :
unable to access index for repository
cannot open URL ''

package ‘class’ is not available (for R version 3.5.2)

Can anyone help me with this issue. Thanks in advance

Choose another repository, generally the closer geographically the better.

In RStudio: Tools | Global Options | Packages | CRAN mirror | Change

A list of repos is at

In R console Preferences | Startup | Default Cran Mirror

Try with Rstudio's CRAN repository

install.packages('class', repos='')

If you still get this error message, check if your internet connection is behind a proxy server or firewall.

many thanks for your help. it worked. :slight_smile:

If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it:

1 Like

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.