Home Forum Fuoritema Installazione package "quantstrat"

Questo argomento contiene 0 risposte, ha 1 partecipante, ed è stato aggiornato da  LV 2 settimane, 6 giorni fa.

Stai vedendo 1 articolo (di 1 totali)
  • Autore
    Articoli
  • #6621

    LV
    Partecipante

    Buongiorno a tutti, chiedo aiuto a Voi per l’installazione del pacchetto “quanstrat” scaricabile solo da GitHub. Ho provato in molti modi servendomi anche di Rtools ma nulla non riesco proprio ad installarlo. Vi allego il link dove si può trovare il pacchetto https://github.com/braverock/quantstrat. Inoltre Vi allego il codice per l’installazione e ciò che mi restituisce R

    > install.packages("devtools") # if not installed
    trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/devtools_2.0.2.zip'
    Content type 'application/zip' length 383664 bytes (374 KB)
    downloaded 374 KB
    
    package ‘devtools’ successfully unpacked and MD5 sums checked
    
    The downloaded binary packages are in
    	C:\Users\Luca Vuerich\AppData\Local\Temp\Rtmp8U0TV8\downloaded_packages
    > install.packages("FinancialInstrument") #if not installed
    trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/FinancialInstrument_1.3.1.zip'
    Content type 'application/zip' length 547754 bytes (534 KB)
    downloaded 534 KB
    
    package ‘FinancialInstrument’ successfully unpacked and MD5 sums checked
    
    The downloaded binary packages are in
    	C:\Users\Luca Vuerich\AppData\Local\Temp\Rtmp8U0TV8\downloaded_packages
    > install.packages("PerformanceAnalytics") #if not installed
    Warning in install.packages :
      dependency ‘quadprog’ is not available
    trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/PerformanceAnalytics_1.5.2.zip'
    Content type 'application/zip' length 2862253 bytes (2.7 MB)
    downloaded 2.7 MB
    
    package ‘PerformanceAnalytics’ successfully unpacked and MD5 sums checked
    
    The downloaded binary packages are in
    	C:\Users\Luca Vuerich\AppData\Local\Temp\Rtmp8U0TV8\downloaded_packages
    > 
    > # next install blotter from GitHub
    > devtools::install_github("braverock/blotter")
    Downloading GitHub repo braverock/blotter@master
    Skipping 1 packages not available: quadprog
    √  checking for file 'C:\Users\Luca Vuerich\AppData\Local\Temp\Rtmp8U0TV8\remotes87b84d495977\braverock-blotter-623e5d9/DESCRIPTION' (556ms)
    -  preparing 'blotter':
    √  checking DESCRIPTION meta-information ... 
    -  cleaning src
    -  checking for LF line-endings in source and make files and shell scripts (374ms)
    -  checking for empty or unneeded directories
    -  looking to see if a 'data/datalist' file should be added
    -  building 'blotter_0.14.3.tar.gz'
       
    * installing *source* package 'blotter' ...
    ** libs
    C:/RBuildTools/3.5/mingw_64/bin/gcc  -I"C:/Users/LUCAVU~1/DOCUME~1/R/R/R-35~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c calcPosAvgCost.c -o calcPosAvgCost.o
    C:/RBuildTools/3.5/mingw_64/bin/gcc  -I"C:/Users/LUCAVU~1/DOCUME~1/R/R/R-35~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c init.c -o init.o
    C:/RBuildTools/3.5/mingw_64/bin/gcc -shared -s -static-libgcc -o blotter.dll tmp.def calcPosAvgCost.o init.o -LC:/Users/LUCAVU~1/DOCUME~1/R/R/R-35~1.3/bin/x64 -lR
    installing to C:/Users/Luca Vuerich/Documents/R/R/R-3.5.3/library/blotter/libs/x64
    ** R
    ** data
    ** demo
    ** byte-compile and prepare package for lazy loading
    Error: package or namespace load failed for 'PerformanceAnalytics' in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
     there is no package called 'quadprog'
    Error : package 'PerformanceAnalytics' could not be loaded
    ERROR: lazy loading failed for package 'blotter'
    * removing 'C:/Users/Luca Vuerich/Documents/R/R/R-3.5.3/library/blotter'
    In R CMD INSTALL
    Error in i.p(...) : 
      (converted from warning) installation of package ‘C:/Users/LUCAVU~1/AppData/Local/Temp/Rtmp8U0TV8/file87b815f84039/blotter_0.14.3.tar.gz’ had non-zero exit status
    > # next install quantstrat from GitHub
    > devtools::install_github("braverock/quantstrat")
    Downloading GitHub repo braverock/quantstrat@master
    Skipping 1 packages not available: blotter
    √  checking for file 'C:\Users\Luca Vuerich\AppData\Local\Temp\Rtmp8U0TV8\remotes87b84a7e6e15\braverock-quantstrat-1e0beb5/DESCRIPTION' (505ms)
    -  preparing 'quantstrat': (671ms)
    √  checking DESCRIPTION meta-information ... 
    -  cleaning src
    -  excluding invalid files (554ms)
       Subdirectory 'R' contains invalid file names:
         '.vimrc'
       Subdirectory 'man' contains invalid file names:
         '.onLoad.Rd'
    -  checking for LF line-endings in source and make files and shell scripts
    -  checking for empty or unneeded directories
    -  looking to see if a 'data/datalist' file should be added
    -  building 'quantstrat_0.15.6.tar.gz'
       
    ERROR: dependency 'blotter' is not available for package 'quantstrat'
    * removing 'C:/Users/Luca Vuerich/Documents/R/R/R-3.5.3/library/quantstrat'
    In R CMD INSTALL
    Error in i.p(...) : 
      (converted from warning) installation of package ‘C:/Users/LUCAVU~1/AppData/Local/Temp/Rtmp8U0TV8/file87b873127f4/quantstrat_0.15.6.tar.gz’ had non-zero exit status
Stai vedendo 1 articolo (di 1 totali)

Devi essere loggato per rispondere a questa discussione.