无法安装Quantstrat

时间:2015-03-30 01:18:47

标签: r quantstrat

我试图在Mac上安装quantstrat软件包,但是当我尝试

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

我明白了

package 'quantstrat' is available as a source package but not as a binary

Warning in install.packages :
  package 'quantstrat' is not available (as a binary package for R version 3.1.3)

当我从here下载tar.gz文件时 并尝试从R:

安装它
install.packages("path/quantstrat",repos = NULL, type="source")

我得到了

Warning in install.packages :
  installation of package 'path/quantstrat' had non-zero exit status

当我从终端

尝试时
CMD INSTALL quantstrat_0.9.1669.tar.gz

我得到了

ERROR: dependencies ‘xts’, ‘TTR’, ‘blotter’, ‘FinancialInstrument’ are not available for package ‘quantstrat’

1 个答案:

答案 0 :(得分:2)

我怀疑tar.gz文件已损坏,您应该尝试使用zip文件

所以当我尝试

install.packages("C:/Program Files/Microsoft/MRO/R3.3.0/library/blotter_0.9.1741.zip",
                                   repos = NULL, type="source")

install.packages("C:/Program Files/Microsoft/MRO/R-3.3.0/library/quantstrat_0.9.1739.zip",
                                    repos = NULL, type="source")

然后它有效!