无法在MacOS Sierra上为R版本3.3.3上的R安装quantstrat

时间:2017-06-26 13:11:13

标签: r

我试图在我的mac上运行此安装quantstrat:

install.packages("blotter", repos="http://R-Forge.R-project.org")

然而,我遇到了一大堆错误:

Warning in install.packages :
  dependency 'blotter' is not available

trying URL 'http://R-Forge.R-project.org/src/contrib/quantstrat_0.9.1739.tar.gz'

Content type 'application/x-gzip' length 797162 bytes (778 KB)
==================================================
downloaded 778 KB

During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C" 
2: Setting LC_TIME failed, using "C" 
3: Setting LC_MESSAGES failed, using "C" 
4: Setting LC_MONETARY failed, using "C" 
ERROR: dependency 'blotter' is not available for package 'quantstrat'
* removing '/Library/Frameworks/R.framework/Versions/3.3/Resources/library/quantstrat'
Warning in install.packages :
  installation of package 'quantstrat' had non-zero exit status

这纯粹是由于blotter依赖吗?如何下载blotter包,因为R 3.3.3似乎无法使用?

非常感谢任何帮助,谢谢!

1 个答案:

答案 0 :(得分:3)

因为在R-Forge中使用quantstrat构建失败,所以无法获得预构建文件(.tar.gz)。你可以从github获取代码并自己构建。

install.packages("devtools")
require(devtools)
install_github("braverock/blotter") # dependency
install_github("braverock/quantstrat")