Cannot install packages on IOS

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

install.packages("class")
Warning in install.packages :
unable to access index for repository http://stat.ethz.ch/CRAN/src/contrib:
cannot open URL 'http://stat.ethz.ch/CRAN/src/contrib/PACKAGES'

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 https://cran.r-project.org/mirrors.html

In R console Preferences | Startup | Default Cran Mirror

Try with Rstudio's CRAN repository

install.packages('class', repos='http://cran.rstudio.com/')

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.