Cannot install packages on IOS

mac
package-installation
#1

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

0 Likes

#2

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

0 Likes

#3

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.

0 Likes

#4

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

0 Likes

#5

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

closed #6

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.

0 Likes