在(Windows)R版本3.5.1上安装RQuantLib

时间:2018-07-04 06:49:05

标签: r install.packages

我在安装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 

1 个答案:

答案 0 :(得分:0)

有关故障排除,请阅读: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')