user3805787
user3805787

Reputation: 1

Error when installing XLConnect in RStudio

Thanks in advance. I am trying to install XLConnect package. I am using RStudio. For your information rJava is installed.

Here is my command in R and the error message:

install.packages("XLConnect")

trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/XLConnect_0.2-7.zip' Content type 'application/zip' length 17997942 bytes (17.2 Mb) opened URL downloaded 16.7 Mb

Warning in install.packages : downloaded length 17473536 != reported length 17997942

Warning in install.packages : error 1 in extracting from zip file

Warning in install.packages : cannot open compressed file 'XLConnect/DESCRIPTION', probable reason 'No such file or directory'

Error in install.packages : cannot open the connection

Upvotes: 0

Views: 2254

Answers (3)

Itika Garg
Itika Garg

Reputation: 9

I faced similar issue while downloading some package. Try re-installing the package cran using

install.packages("CRAN")

See if it works, if the issue of unmatched length persists uninstall RStudio and install it again.

That seemed to have worked for me.

Upvotes: 0

zizaozi
zizaozi

Reputation: 56

Try installing using standard R and the standard R will tell you where is package zip file is saved. Then you can install using RStudio by installing package from local zip file.

Upvotes: 0

Martin Studer
Martin Studer

Reputation: 2321

The warnings indicate that something is corrupting the package download. Quite often the reason is a corporate firewall. You might want to check with your IT whether this is the case.

Upvotes: 0

Related Questions