问题安装包' quantmod'

时间:2015-11-06 02:08:07

标签: r packages quantmod

当我尝试从CRAN存储库安装quantmod包时,我一直遇到此错误:

install.packages("quantmod")
Installing package into ‘C:/Users/Dominic/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
also installing the dependencies ‘xts’, ‘zoo’, ‘TTR’

Packages which are only available in source form, and may need compilation of
  C/C++/Fortran: ‘xts’ ‘zoo’ ‘TTR’ ‘quantmod’
  These will not be installed

我还在本地下载了.gz文件并安装但出现以下错误:

Installing package into ‘C:/Users/Dominic/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
ERROR: dependencies 'xts', 'zoo', 'TTR' are not available for package 'quantmod'
* removing 'C:/Users/Dominic/Documents/R/win-library/3.2/quantmod'
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-32~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\Dominic\Documents\R\win-library\3.2" "C:/Users/Dominic/AppData/Local/Temp/RtmpMnw2yn/downloaded_packages/quantmod_0.4-5.tar.gz"' had status 1
Warning in install.packages :
  installation of package ‘C:/Users/Dominic/AppData/Local/Temp/RtmpMnw2yn/downloaded_packages/quantmod_0.4-5.tar.gz’ had non-zero exit status

以下是sessionInfo()

的输出
R version 3.2.2 (2015-08-14) 
Platform: x86_64-w64-mingw32/x64 (64-bit) 
Running under: Windows 8 x64 (build 9200) 
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] stats graphics grDevices utils datasets methods base 

loaded via a namespace (and not attached):
[1] tools_3.2.2

1 个答案:

答案 0 :(得分:1)

1-从以下版本下载最新版本: https://cran.r-project.org/bin/windows/contrib/3.4/quantmod_0.4-8.zip

2-将其解压缩到您的包目录中。它可以找到: .libPaths()

3-确保文件夹名称为" quantmod"在您的包目录中。

4-键入库(" quantmod")