我正在尝试安装quantstrat,但是我总是遇到以下错误:
> install.packages("quantstrat",repos="http://R-Forge.R-project.org")
Warning in install.packages :
package ‘quantstrat’ is not available (for R version 3.0.1)
Installing package into ‘C:/Users/mp/Documents/R/win-library/3.0’
(as ‘lib’ is unspecified)
trying URL 'http://R-Forge.R-project.org/bin/windows/contrib/3.0/quantstrat_0.7.8.zip'
Content type 'application/zip' length 1047389 bytes (1022 Kb)
opened URL
downloaded 1022 Kb
package ‘quantstrat’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\TEMP\Rtmp8uoKKX\downloaded_packages
> require(quantstrat)
Lade nötiges Paket: quantstrat
Lade nötiges Paket: foreach
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
es gibt kein Paket namens ‘iterators’
Failed with error: ‘Paket ‘foreach’ konnte nicht geladen werden’抱歉,错误消息是德语。第一个错误是:“没有名为‘iterators’的包”第二个错误是:“包'foreach‘无法加载”
发布于 2016-10-21 23:05:11
我遇到了同样的问题,为了让安装程序运行,我必须首先安装quantmod包,因为其余的包都需要预先安装。
所以首先要解决这个依赖:
install.packages("quantmod"),然后对其余的包执行
install.packages("FinancialInstrument", repos="http://R-Forge.R-project.org")
install.packages("blotter", repos="http://R-Forge.R-project.org")
install.packages("quantstrat", repos="http://R-Forge.R-project.org")发布于 2015-07-15 22:42:31
尝试从源安装,CRAN不是最新的,只有通过从源安装才能获得最新的修复。我有R-3.2.1 x64,安装了很好的表单源码。
在R控制台或RStudio中按此顺序使用以下内容:
install.packages("FinancialInstrument", repos="http://R-Forge.R-project.org")
install.packages("blotter", repos="http://R-Forge.R-project.org")
install.packages("quantstrat", repos="http://R-Forge.R-project.org")希望这能有所帮助。
发布于 2020-07-05 08:39:41
这里很晚了,但可能需要注意的是,"quantstrat“不在CRAN上,几年前就转移到了GitHub上。repo (https://github.com/braverock/quantstrat)上的自述文件提供了有关安装quantstrat的更多信息。
install.packages("devtools") # if not installed
install.packages("FinancialInstrument") #if not installed
install.packages("PerformanceAnalytics") #if not installed
# next install blotter from GitHub
devtools::install_github("braverock/blotter")
# next install quantstrat from GitHub
devtools::install_github("braverock/quantstrat")https://stackoverflow.com/questions/18186591
复制相似问题