【问题标题】:Update packages in RStudio doesn't workRStudio 中的更新包不起作用
【发布时间】:2015-08-14 16:12:57
【问题描述】:
  • R 3.2.1
  • RStudio 版本 0.99.473
  • 麦金塔;英特尔 Mac OS X 10_9_4

单击更新包会弹出一个显示“R 错误”的窗口,然后在控制台中打印出错误:

Error in if (substr(cranRep, cranRepLen, cranRepLen) != "/") cranRep <- 
paste(cranRep,  :missing value where TRUE/FALSE needed

我确实有一个用于启动的 .Rprofile。

【问题讨论】:

    标签: r rstudio


    【解决方案1】:

    使用a little digging into Github,答案似乎是在 .Rprofile 中指定以下内容:

    options(repos=c(CRAN="https://cran.rstudio.com/"))
    

    相对于

    options(repos="https://cran.rstudio.com/")
    

    【讨论】:

      【解决方案2】:

      我遇到了同样的问题,即缺少 TRUE/FALSE 需要的值

      R 和 RStudio 版本
      • R Studio 1.0.143
      • R 3.4.0

      我通过编辑 Rprofile.site 解决了。以下是步骤:

      第 1 步: 转到 C:\Program Files\R\R-3.4.0\etc 或 Rprofile.site 所在的位置

      第 2 步: 打开 Rprofile.site。并将“设置 Cran 镜像”编辑为

          local({r <- getOption("repos")
          r["CRAN"] <- "https://cran.rstudio.com/"
          options(repos=r)})
      

      第 3 步: 必要时重启 RStudio

      【讨论】:

        猜你喜欢
        • 2020-10-06
        • 2017-10-17
        • 2016-05-23
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-06-29
        • 2017-12-05
        相关资源
        最近更新 更多