Error when installing XLConnect in RStudio - windows-7

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

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.

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.

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.

Related

Unable to load libraries

I recently updated R and Rstudio and since then have not been able to load any libraries, including ggplot2, tidyverse.
Just for clarity, let me share the messages I get when I install tidyverse and try to load the library:
install.packages("tidyverse")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
**https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/Computer User 1/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/tidyverse_1.3.2.zip'
Content type 'application/zip' length 428970 bytes (418 KB)
downloaded 418 KB
package ‘tidyverse’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Computer User 1\AppData\Local\Temp\RtmpQZdI11\downloaded_packages**
**> library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’ in inDL(x, as.logical(local), as.logical(now), ...):
unable to load shared object 'C:/Program Files/R/R-4.2.2/library/stats/libs/x64/stats.dll':
LoadLibrary failure: The specified module could not be found.
**
Also, to be clear, I did install the latest version of Rtools.
Now I tried reading through several messages on google regarding the same error but failed to understand the solution. The main thing I do not understand is why the packages are installed here: C:\Users\Computer User 1\AppData\Local\Temp\RtmpQZdI11\downloaded_packages, and then are loaded from here: C:/Program Files/R/R-4.2.2/library/stats/libs/x64/stats.dll.
I have tried specifying the library path but have not been successful at solving the problem. I don't know why R is unable to load the libraries. Also, on running .libpaths(), I get two libraries:
[1] "C:/Users/Computer User 1/AppData/Local/R/win-library/4.2"
[2] "C:/Program Files/R/R-4.2.2/library"
And when I try to install tidyverse here: C:/Program Files/R/R-4.2.2/library, I get this error: the folder is unwritable.
I don't know how to solve this issue. Please help.

ldf is not supported

I install asammdf package to read dat file in python. After installing asammdf using pip install asammdf, the installation is successful. However, when I import asammdf, I got ldf is not supported.
May I know how to solve this issue and after installing the asammdf? Moreover I also cannot open the spyder in my anaconda
That is just a warning message from the canmatrix library. If you don't use LIN database file (ldf files) for bus logging decoding then you can just ignore it.
If you really want to make it go away then just install the ldfparser package since this is required for ldf support ( see
https://github.com/ebroecker/canmatrix/blob/6ed291b73a5824e367615c99ee1b4e6084eb026e/setup.py#L98)

Issue installing library(plyr) in R (Windows)

I have R version 3.2.2 and am working on Windows 10. I am trying to install library(plyr), but could not install 'Rcpp' dependency (see warning in bold fonts). Install message and warnings below. Any suggestions?
Thanks!
utils:::menuInstallPkgs()
also installing the dependency ‘Rcpp’
trying URL >'https://mirrors.nics.utk.edu/cran/bin/windows/contrib/3.2/Rcpp_0.12.1.zip'
Content type 'application/zip' length 3189850 bytes (3.0 MB)
downloaded 3.0 MB
trying URL
'https://mirrors.nics.utk.edu/cran/bin/windows/contrib/3.2/plyr_1.8.3.zip'
Content type 'application/zip' length 1114768 bytes (1.1 MB)
downloaded 1.1 MB
package ‘Rcpp’ successfully unpacked and MD5 sums checked
Warning: unable to move temporary installation > >‘C:\Users\xxx\Documents\R\win-library\3.2\file2e0437cc54d8\Rcpp’ to
‘C:\Users\xxx\Documents\R\win-library\3.2\Rcpp’
package ‘plyr’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\mydejesus\AppData\Local\Temp\Rtmp0yK2yD\downloaded_packages
library(plyr)
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck =
vI[[j]]) :
there is no package called ‘Rcpp’
Error: package or namespace load failed for ‘plyr’
Looks like it's a permissions setting in Windows. I changed the permission on the folder to share with everyone and it installed successfully.

I am trying to install devtools on Rstudio

I am trying to install devtools on Rstudio, and I am receiving this error message:
install.packages("devtools")
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/devtools_1.7.0.zip'
Content type 'application/zip' length 308736 bytes (301 Kb)
opened URL
downloaded 301 Kb
package ‘devtools’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘devtools’
The downloaded binary packages are in
C:\Users\David\AppData\Local\temp\Rtmpu4TtC7\downloaded_packages
What is the best way to resolve. Thanks.

Softaculous/AMPPS - The installation package could not be found (localhost)

The installation package could not be found error returns after I hit install on http://localhost/ampps/ for most of the available packages such as Wikimedia.
I tried to find out where this error comes from such as updating setting in
http://localhost/ampps-admin/
and no success yet. Anyone with any recommendation? Thanks!
Delete the folder Ampps/ampps/scripts/mw and try installing again from http://localhost/ampps again.
Softaculous will download the package automatically if not found.

Resources