The error is due to R being unable to find a binary version of the package on CRAN, instead only finding a source version of the package and your Windows installation being unable to compile it. Usually this doesn't occur, but in this case was caused by the (temporary) outage of some of the mirrors at CRAN. If you type:
> getOption('repos')
CRAN CRANextra
"http://cran.rstudio.com" "http://www.stats.ox.ac.uk/pub/RWin"
attr(,"RStudio")
[1] TRUE
You will see that R uses "http://cran.rstudio.com"
by default to look for a package to download. If you see the cran mirrors web page you can see at the top that "http://cran.rstudio.com"
actually redirects you to different servers world wide (I assume according to the geo location).
When I had the above issue, I solved it by manually changing the repo to one of the urls in the link provided. I suggest you use a different country (or even continent) in case you receive the above error.
I provide below some of the urls in case the link above changes:
- Brazil http://nbcgib.uesc.br/mirrors/cran/
- Italy http://cran.mirror.garr.it/mirrors/CRAN/
- Japan http://cran.ism.ac.jp/
- South Africa http://r.adu.org.za/
- USA https://cran.cnr.Berkeley.edu/
You need to run the function install.packages
as follows:
install.packages('<package_name>', repo='http://nbcgib.uesc.br/mirrors/cran/')
#or any other url from the list or link
One of them should then work to install a binary from an alternative mirror.
Warning in install.packages : package ‘stringi’ is not available (for R version 3.2.1)
– Syllabubdata.table
. Other packages installed fine - how is it for you? I already tried different mirrors and I have Rtools installed... – DavitError: package or namespace load failed for ‘data.table’: package ‘data.table’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version
– Tamp