1

Since today I am using the R Version 3.2.0 for statistical analysis. Today I try to install the packages "xlsx" and "xlsxjars" for my new installation but it didn't work. Every time I try to install the packages (install.packages("xlsx")) I get the following error message:

Warning in install.packages :
downloaded length 9351168 != reported length 9485172
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.2/xlsx_0.5.7.zip'
Content type 'application/zip' length 400857 bytes (391 KB)
downloaded 391 KB
Warning in install.packages :
  error 1 in extracting from zip file
Warning in install.packages :
  cannot open compressed file 'xlsxjars/DESCRIPTION', probable reason 'No such file or directory'
Error in install.packages : cannot open the Connection`

The problem only take place when I try to install the xls-packages. Other packages can be installed smoothly without any problems. I hope there is anyone out there who had already installed the aforesaid packages in R Version 3.2.0 and can give me a short advice how to install the packages in the new R Version?

Falko
  • 17,076
  • 13
  • 60
  • 105
TimR
  • 11
  • 1
  • 3
  • Have you tried downloading the package and installing from source? – tcash21 Apr 28 '15 at 13:22
  • Yes i tried. This procedure generates the following massage: `install.packages("P:/R-Schulungsunterlagen/xlsx_0.5.7.zip", repos = NULL) Installing package into ‘C:/Users/TRodewig/Documents/R/win-library/3.2’ (as ‘lib’ is unspecified) Error in install.packages : type == "both" cannot be used with 'repos = NULL' ` – TimR Apr 28 '15 at 13:54
  • 2
    Use `type="source"`. And check whether your Java version is correct for the package and the bit-ness of your installation. And either install xlsxjars and rJava first or set `dependencies=TRUE` – IRTFM Apr 28 '15 at 18:02

1 Answers1

0

First,

setInternet2(use=TRUE)

Then install necessary packages individually:

install.packages('rJava')
install.packages('xlsxjars')
install.packages('xlsx')
amrrs
  • 6,215
  • 2
  • 18
  • 27