【问题标题】:installing RQuantLib on (Windows) R version 3.5.1在 (Windows) R 版本 3.5.1 上安装 RQuantLib
【发布时间】:2018-07-04 06:49:04
【问题描述】:

我在安装 RQuantLib 时遇到问题。我最近将 R 升级到 version 3.5.1,现在它无法安装。

我尝试过以下指示:This post

不幸的是,它不起作用。我尝试从here 下载.tar,然后从那里手动安装,但输出如下:

    install.packages("C:/Users/frys/Google Drive/R/RQuantLib_0.4.4.tar.gz", repos = NULL, type = "source")

Installing package into ‘C:/Users/frys/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
ERROR:  Unix-only package
* removing 'C:/Users/frys/Documents/R/win-library/3.5/RQuantLib'
In R CMD INSTALL
Warning in install.packages :
  installation of package ‘C:/Users/frys/GOOGLE~1/R/RQuantLib_0.4.4.tar.gz’ had non-zero exit status

library('RQuantLib')
Error in library("RQuantLib") : there is no package called ‘RQuantLib’

#下面的我也试过了

install.packages('RQuantLib',type="binary")
Installing package into ‘C:/Users/frys/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
Warning in install.packages :
  unable to access index for repository https://ghrr.github.io/drat/bin/windows/contrib/3.5:
  cannot open URL 'https://ghrr.github.io/drat/bin/windows/contrib/3.5/PACKAGES'
Warning in install.packages :
  package ‘RQuantLib’ is not available (as a binary package for R version 3.5.1)

library('RQuantLib')
Error in library("RQuantLib") : there is no package called ‘RQuantLib’

在我升级 R 之前,该软件包运行良好...感谢任何帮助。

sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] drat_0.1.4                 RSQLite_2.1.1              DBI_1.0.0                 
 [4] rvest_0.3.2                xml2_1.2.0                 PerformanceAnalytics_1.5.2
 [7] highfrequency_0.5.3        data.table_1.11.4          XML_3.98-1.11             
[10] quantmod_0.4-13            TTR_0.23-3                 xts_0.10-2                
[13] zoo_1.8-2                  doParallel_1.0.11          iterators_1.0.9           
[16] foreach_1.4.4              pbapply_1.3-4              plyr_1.8.4                
[19] jsonlite_1.5               RCurl_1.95-4.10            bitops_1.0-6              
[22] derivmkts_0.2.3           

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.17     compiler_3.5.1   tools_3.5.1      digest_0.6.15    bit_1.1-14      
 [6] memoise_1.1.0    lattice_0.20-35  curl_3.2         httr_1.3.1       bit64_0.9-7     
[11] grid_3.5.1       R6_2.2.2         blob_1.1.1       magrittr_1.5     codetools_0.2-15
[16] mnormt_1.5-5     quadprog_1.5-5 

【问题讨论】:

  • 关注该帖子的错误信息是什么?对于您尝试的后一种方法,您下载的 tar.gz 用于 Unix。这可能是因为 R >= 3.5.0 的 QuantLib win 二进制文件尚未构建。见cran.r-project.org/web/packages/RQuantLib/README.html
  • 错误:仅 Unix 包 * 删除 'C:/Users/frys/Documents/R/win-library/3.5/RQuantLib'
  • 当我尝试从 zip 安装时:Error: package or namespace load failed for ‘RQuantLib’: package ‘RQuantLib’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version
  • 你可以试试install.packages("RQuantLib", type = "source") 。想法来自r.789695.n4.nabble.com/…
  • 我担心 RQuantlib 的最后一个公开可用的 Windows 版本是 R 3.4,c.f. r-bloggers.com/rquantlib-0-4-4-for-windows/amp。必须有人建造它...

标签: r install.packages


【解决方案1】:

请阅读:this post 进行故障排除。

我必须先安装 Rtools Rtools35.exe。安装完成后,我进入我的 R-console 并输入以下内容:

#install remotes
install.packages('remotes');library('remotes')

# install RQuantLib: Installation took a few minutes
install_github("eddelbuettel/rquantlib")

# After I ran this, RQuantLib was ready to use
library('RQuantLib')

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-05-22
    • 2019-05-03
    • 2015-11-19
    • 1970-01-01
    • 2018-12-04
    • 1970-01-01
    • 2016-07-05
    • 1970-01-01
    相关资源
    最近更新 更多