Reputation: 187
I keep having this error when I try to install quantmod
package from the CRAN repository:
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
I also downloaded the .gz files locally and install but get the following error:
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
Here is the output of 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
Upvotes: 1
Views: 3592
Reputation: 61
1- Download the latest version from: https://cran.r-project.org/bin/windows/contrib/3.4/quantmod_0.4-8.zip
2- unzip it in your package directory. It can be found with: .libPaths()
3- Make sure the folder name reads "quantmod" in your package directory.
4- Type in library("quantmod")
Upvotes: 1