【问题标题】:In travis.ci Rscript seems to be ignoring the .Reviron file在 travis.ci Rscript 似乎忽略了 .Reviron 文件
【发布时间】:2016-01-09 10:26:03
【问题描述】:

在 travis 中,我正在使用以下行创建一个 Renviron 文件:

options(repos = c(CRAN="http://cran.rstudio.com",DRAT="http://sahilseth.github.io/drat")

这增加了两个存储库 CRAN(官方 R 存储库)和我的个人存储库。

这在我自己的计算机上完美运行,但在 travis 上,R 似乎忽略了 .Rprofile 文件。

这是来自 travis 输出的一个块 (https://travis-ci.org/sahilseth/flowr/builds/84850698)

echo 'options(repos = c(CRAN="http://cran.rstudio.com",DRAT="http://sahilseth.github.io/drat")' > .Rprofile
Rscript -e 'options("repos");print(.libPaths())'

输出:

$repos
    CRAN 
"@CRAN@" 
[1] "/home/travis/Rlib"             "/usr/local/lib/R/site-library"
[3] "/usr/lib/R/site-library"       "/usr/lib/R/library"           

在PC上运行同样的显示:

$repos
                 CRAN
"http://cran.rstudio.com"
                 DRAT
"http://sahilseth.github.io/drat

【问题讨论】:

  • 奇怪。现在正在看,但现在什么都想不起来。

标签: r travis-ci rscript


【解决方案1】:

您在用于创建 .Rprofile 的行中缺少右括号:

echo 'options(repos = c(CRAN="http://cran.rstudio.com", 
                        DRAT="http://sahilseth.github.io/drat"))' > .Rprofile

【讨论】:

  • 除非我遗漏了你写他写的东西。应该有什么不同?
  • 您正好缺少一个)。最后我有两个右括号——他只有一个。
  • 我真的不知道,我怎么错过了!!尴尬
  • 是的,我也错过了。发现得好。另一个成功的 drat 使用预订了 :)
猜你喜欢
  • 2012-02-10
  • 2021-10-28
  • 2016-09-30
  • 2016-03-16
  • 2014-02-03
  • 2012-03-11
  • 2013-09-07
  • 2016-08-12
  • 1970-01-01
相关资源
最近更新 更多