R package installation fail from source - r

I am trying to install a home-made package in R. It installs OK on two computers, but on another, I get this error message:
Error in rawToChar(block[seq_len(ns)]) :
embedded nul in string: 'PK\003\004\024\0\0\0\b\0יxיPװ\331Qbב\037\0\0\337%\0\0\r\0\0\0[Content].tarםZeX\034\335\025^,$xp‡אממ\301%8\004\b÷Xp[$¸»\004\r.\301\002‹»\023\\ƒ»\005w‡ !H7\375\332¦´M\373פO\177uז'
Warning in install.packages :
Is there a fix? What can cause the problem?
The packages is written mostly in RcppArmadillo, with some extra C++ packages. When I use the check option I get no errors nor warnings.

Related

Unable to install quantreg package and update R version

I am using R version 3.3.1 on RStudio interface, and a Windows 10 OS. I was trying to install the 'quantreg' package for quantile regression, however I was getting the error message
Warning in install.packages :
InternetOpenUrl failed: 'The operation timed out'
Warning in install.packages :
downloaded length 180224 != reported length 1521162
Warning in install.packages :
package ‘quantreg’ is not available (for R version 3.3.1)
I repeated the process afterwards several times but got the last line of the above error all the time. Thinking it was due to using an older R version, I tried updating by installing the 'installr' package, but that too gave me the same error as above. I tried updating R from the Tools Menu, but it kept telling me that the current R version is the latest.
Also this is my first time here, so apologies if I've messed up the blockquoting.
You need to downgrade R.
Download an older version here (I recommend 3.2.5) and install.
Then (in R), go to Tools > Global Options > press the "Change" button.
Now simply select the version you want and restart R and try reinstalling the package.

Error installing packages in Rstudio

I have R 3.2.2 setup installed in my system,with RStudio version 0.99.489. When I tried to install rJava package,
install.packages("rJava")
I am getting following Error:
Warning in install.packages :
downloaded length 4878 != reported length 200
Error in install.packages : subscript out of bounds
But if I run the below command before installing any package,it works fine, but I don't want to do this every time I install a package.
options(repos=structure(c(CRAN="http://cran.us.r-project.org")))
You can stick the line you want executed at every startup in your .Rprofile file which should be in your home directory. I have 3.2.3 version of R and that worked; however I do get a warning message about using a non-http version of the site.
Similarly to you, I was finding the original repository the system was using was failing to install the packages--not finding the package or downloading a file with too few bytes, perhaps because of a transient problem. You might want to consider not putting this in your .Rprofile file or commenting the line outin case this is a temporary workaround.

ggplot2 version 1.0.1 won't load into R 3.2.2 for Windows

I just started using R and downloaded ggplot2
install.packages("ggplot2")
I get the following warning:
Warning in install.packages:
unable to move temporary installation '\\CHI-FIlE-01\UserFolders$\naresh.kavuri\Documents\R\win-library\3.2\file27ac2d3b613c\ggplot' to '\\CHI-FILE-01\UserFolders$\naresh.kavuri\Documents\R\win-library\3.2\ggplot2'
This warning is followed up with this error:
Error: invalid version specification 'NA'
In addition: warning message:
In utils:::packageDescription(packageName, fields = "Version") :
no package 'knitr' was found
As anyone come across this problem before? Did I do something wrong in the setup?
If you have multiple versions of R running, and you try to update or reinstall a package in one version of R while it is loaded in another, then the old version of the package doesn't get completely removed.
Try closing down all instances of R, manually deleting the folder containing the package, then opening a single version of R and reinstalling.
As Pascal commented, antivirus file scans can also interfere with the installation process. Sometimes downloading the package zip/tar.gz file then installing from disk can circumvent the issue.

Error message from install.packages() - wayward continuation line

With RStudio and running under Windows, my effort to install the textreg package encountered a strange error:
> install.packages("textreg")
Warning in install.packages :
downloaded length 17116 != reported length 200
Warning in install.packages :
downloaded length 17116 != reported length 200
Error in install.packages : Found continuation line starting ' <title>Marriott – ...' at begin of record.
Does the error tell me that something in the package has the gremlin ....? Can I fix that problem at my end or should I write Luke Miratrix, the maintainer? Or am I doing something foolish?
Thank you
The windows binary is currently not available from CRAN and that install.packages didn't report that indicates that the mirror is not up-to-date. However, I was able to build the package from source on my Win7 system. Thus, you can use install.packages("textreg", type="source").
The windows binary is currently not available from CRAN because the package failed the windows test suite (for reasons as yet unknown). I am working on fixing that error and apologize for any inconvenience. That being said, installing as mentioned above via
install.packages("textreg", type="source")
will give you a working package. If you get it to crash, please contact me (the maintainer) with details.
Also note that a further mild issue is the static vignette "bathtub" does not show up on CRAN, but is in the inst/doc directory of the package. You can also test the package with the testthat package using the inst/test/testthat folder in the package.

Install R package: UScensus2010blk for windows

Did anyone tried to install R package: UScensus2010blk on your own PC?
I tried to use from UScensus2010:
install.blk ("windows")
It gives an error saying "Not Available Yet"
I downloaded the package myself (4.2GB!) and tried to install from local and I still get error messages:
installing source package 'UScensus2010blk' ...
** data
Warning in file.copy(files, is, TRUE) :
problem copying data\montana.blk10.rda to Q:\LCVDJ\R\R-3.0.2\library\UScensus2010blk\data\montana.blk10.rda: Invalid argument
...
(the error message repeats for different states)
...
** help
Error in lazyLoadDBinsertListElement(from, i, datafile, ascii, compress, :
write failed
ERROR: installing Rd objects failed for package 'UScensus2010blk'
* removing 'Q:/LCVDJ/R/R-3.0.2/library/UScensus2010blk'
Warning in install.packages :
running command '"Q:/LCVDJ/R/R-30~1.2/bin/i386/R" CMD INSTALL -l "Q:\LCVDJ\R\R-3.0.2\library" "C:/Users/n1304/Downloads/UScensus2010blk_1.00.tar.gz"' had status 1
Warning in install.packages :
installation of package ‘C:/Users/n1304/Downloads/UScensus2010blk_1.00.tar.gz’ had non-zero exit status
Does anyone have any idea why my installation is failed? I'm using R-3.0.2
Thanks!
There's an error in the census2010 package. The functions install.tract, install.blk, install.blkgrp, install.county, and install.cdp are supposed to check for R version >= 2.11 if you call the functions with the "windows" argument, but they only check the minor version so if you have R version 3.0 through 3.10 they incorrectly report an error.
To work around this error, you should be able to run
install.packages('UScensus2010blk', repos='http://lakshmi.calit2.uci.edu/census2000/R/', type='source')
instead of
install.blk('windows')
I tried to install it, and received the same message. It appears to be a problem with all the "windows" installations, as the command install.blk("linux") is functional.

Resources