R包install失败:cannot open URL

作者: 柳叶刀与小鼠标 | 来源:发表于2019-07-20 13:08 被阅读37次

    R语言包安装问题:

    这是一类包的安装问题:

    R包install失败:cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES'

    Warning: unable to access index for repository https://mirrors.ustc.edu.cn/CRAN/src/contrib:
    cannot open URL 'https://mirrors.ustc.edu.cn/CRAN/src/contrib/PACKAGES'

    解决办法:

    将https换成http,虽然我们浏览器不管是http、https都能打开.

    options(repos='http://cran.rstudio.com/')
    

    参考https://stackoverflow.com/questions/25599943/unable-to-install-packages-in-latest-version-of-rstudio-and-r-version-3-1-1

    注:重启R后又会变回原来的https的...

    然后要改个R studio设置: Tools -> Global Options -> Packages and unchecking the "Use Internet Explorer library/proxy for HTTP" option.

    将Use Internet Explorer library/proxy for HTTP选项反勾选

    相关文章

      网友评论

        本文标题:R包install失败:cannot open URL

        本文链接:https://www.haomeiwen.com/subject/zxnylctx.html