Tseries package installation fails

I am trying to install the tseries package on R. I get this output:

> install.packages('tseries') Warning in install.packages("tseries") : argument 'lib' is missing: using '/usr/local/lib/R/site-library' --- Please select a CRAN mirror for use in this session --- CRAN mirror 1: Argentina (La Plata) 2: Argentina (Mendoza) 3: Australia (Canberra) 4: Australia (Melbourne) 5: Austria 6: Belgium 7: Brazil (PR) 8: Brazil (RJ) 9: Brazil (SP 1) 10: Brazil (SP 2) 11: Canada (BC) 12: Canada (NS) 13: Canada (ON) 14: Canada (QC 1) 15: Canada (QC 2) 16: Chile 17: China (Beijing 1) 18: China (Beijing 2) 19: China (Hefei) 20: China (Hong Kong) 21: China (Xiamen) 22: Colombia (Bogota) 23: Colombia (Cali) 24: Denmark 25: France (Toulouse) 26: France (Lyon 1) 27: France (Lyon 2) 28: Germany (Berlin) 29: Germany (Goettingen) 30: Germany (Muenchen) 31: Germany (Wiesbaden) 32: Greece 33: Indonesia 34: Iran 35: Ireland 36: Italy (Milano) 37: Italy (Padua) 38: Italy (Palermo) 39: Japan (Hyogo) 40: Japan (Tsukuba) 41: Korea 42: Mexico (Mexico City) 43: Mexico (Texcoco) 44: Netherlands (Amsterdam) 45: Netherlands (Utrecht) 46: New Zealand 47: Norway 48: Philippines 49: Poland (Gdansk) 50: Poland (Oswiecim) 51: Poland (Wroclaw) 52: Russia 53: Singapore 54: Slovakia 1 55: Slovakia 2 56: South Africa 5 7: Spain (Madrid) 58: Sweden 59: Switzerland 60: Taiwan (Taichung) 61: Taiwan (Taipei 1) 62: Taiwan (Taipei 2) 63: Thailand 64: UK (Bristol) 65: UK (London) 66: UK (St Andrews) 67: USA (AZ) 68: USA (CA 1) 69: USA (CA 2) 70: USA (IA) 71: USA (MA) 72: USA (MI) 73: USA (MO) 74: USA (OH) 75: USA (OR) 76: USA (PA 1) 77: USA (PA 2) 78: USA (TX 1) 79: USA (TX 2) 80: USA (WA 1) 81: USA (WA 2) Selection: 80 Warning: dependency 'quadprog' is not available trying URL 'http://cran.fhcrc.org/src/contrib/tseries_0.10-26.tar.gz' Content type 'application/x-gzip' length 163770 bytes (159 Kb) opened URL ================================================== downloaded 159 Kb ERROR: dependencies 'quadprog' are not available for package 'tseries' * removing '/usr/local/lib/R/site-library/tseries' The downloaded packages are in '/tmp/Rtmp4BUi9T/downloaded_packages' Warning message: In install.packages("tseries") : installation of package 'tseries' had non-zero exit status 

How to install this package?

+4
source share
2 answers

tseries depends on the quadprog package. You did not have the package installed, and it was not available on the CRAN mirror that you used for the version of R that you are using (non-stationary). Therefore, tseries could not be installed.

You need to install quadprog for your version of R. It may not be available if you are using several versions beyond the current one; quadprog depends on R> = 2.12.0 .

[By the way, these things are R-packages, not libraries.]

+6
source

I ran into the same problem and then solved it as follows.

Using the terminal in Ubuntu, I typed the following commands:

 wget http://cran.r-project.org/src/contrib/quadprog_1.5-4.tar.gz sudo R CMD INSTALL quadprog_1.5-4.tar.gz wget http://cran.r-project.org/src/contrib/tseries_0.10-30.tar.gz sudo R CMD INSTALL tseries_0.10-30.tar.gz 

After that, I was able to start an R session, download the tseries package and successfully use its functions.

You might want to install different versions of the quadprog and tseries packages. If this happens, please change the URL links above.

0
source

All Articles