2015-08-14 98 views
3
  • [R 3.2.1
  • RStudio版本0.99.473
  • Macintosh的;英特尔的Mac OS X 10_9_4

点击更新包的结果,上面写着“R错误”,然后错误在控制台打印出一个弹出窗口:更新包不起作用

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

我有一个.Rprofile我用于启动。

回答

4

随着a little digging into Github,答案似乎被指定在.Rprofile如下:

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

,而不是

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

我有同样的问题,即缺少值,其中TRUE/FALSE所需

R和RStudio版本
  • R工作室1.0.143
  • ř3.4.0

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

步骤1: 转到C:\ Program Files文件\ r \ R-3.4.0 \等或位置,其中Rprofile.site是

步骤2: 打开Rprofile.site 。和编辑 “设置克兰镜” 来

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

第3步:重新启动 如果RStudio必要