install xlsx and xlsxjars in R 3.2.0

不想你离开。 提交于 2019-12-08 07:28:49

问题


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?


回答1:


First,

setInternet2(use=TRUE)

Then install necessary packages individually:

install.packages('rJava')
install.packages('xlsxjars')
install.packages('xlsx')


来源:https://stackoverflow.com/questions/29920544/install-xlsx-and-xlsxjars-in-r-3-2-0

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!