MRAN坏了吗?

时间:2016-11-21 13:04:12

标签: r repository cran install.packages

我一直在尝试从MRAN安装软件包,特别是其他人的软件包。如果我跑:

struct DataStruct // replicate struct in shader
{
    ...
}

#pragma kernel append
StructuredBuffer<DataStruct> inBuffer;
AppendStructuredBuffer<DataStruct> appendBuffer;

[numthreads(8,1,1)]
void append(int id: SV_DispatchThreadID) {
    appendBuffer.Append(inBuffer[id]);
}

我得到以下输出:

install.packages(c("Boom","BoomSpikeSlab", "bsts"),repos = "https://mran.revolutionanalytics.com/snapshot/2016-01-01/")

使用Warning in install.packages : URL 'https://mran.revolutionanalytics.com/snapshot/2016-01-01/bin/macosx/mavericks/contrib/3.3/PACKAGES.gz': status was '404 Not Found' Warning in install.packages : URL 'https://mran.revolutionanalytics.com/snapshot/2016-01-01/bin/macosx/mavericks/contrib/3.3/PACKAGES': status was '404 Not Found' Warning in install.packages : unable to access index for repository https://mran.revolutionanalytics.com/snapshot/2016-01-01/bin/macosx/mavericks/contrib/3.3: cannot download all files Packages which are only available in source form, and may need compilation of C/C++/Fortran: ‘Boom’ ‘BoomSpikeSlab’ ‘bsts’ Do you want to attempt to install these from sources? y/n: 更改存储库位置时,我也得到相同的结果。一个简单的解决方案就是从源代码安装如下:

options()

然而,没有意义的是,当您在浏览器上检查存储库时,二进制文件似乎可用:

https://cran.r-project.org/web/packages/bsts/index.html(CRAN) https://mran.revolutionanalytics.com/snapshot/2016-01-01/web/packages/bsts/index.html(MRAN)

此外,我不想编译源代码especially as R's compiler is out of date ...

上一个stack overflow questions建议这是因为存储库已关闭,但这没有意义,因为可以通过浏览器访问二进制文件。那么MRAN是否存在问题,install.packages(c("Boom","BoomSpikeSlab", "bsts"),repos = "https://mran.revolutionanalytics.com/snapshot/2016-01-01/",type = "source") 是否存在问题?

我应该注意到我已尝试通过终端在RStudio和R中执行此代码。另外,作为参考,这是我的系统详细信息:

install.packages

提前感谢您的帮助。

1 个答案:

答案 0 :(得分:1)

我现在已经解决了这个问题。使用install.packages从MRAN存储库调用时,您需要将URL的“MRAN”部分大写。

这样可行:

install.packages("bsts", repos = "https://MRAN.revolutionanalytics.com/snapshot/2016-06-01/")

这只适用于来源:

install.packages("bsts", repos = "https://mran.revolutionanalytics.com/snapshot/2016-06-01/")