Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R Studio installing stringi fails

Tags:

r

stringi

I'm trying to invoke knit which tells me that it needs an updated version of rmarkdown which needs the package stringi.

When installing stringi I get the following error:

> install.packages("stringi")

Installing package into ‘C:/Users/matan/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)

  There is a binary version available but the source version is later:
        binary source needs_compilation
stringi  1.1.5  1.1.6              TRUE

  Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/stringi_1.1.5.zip'
Warning in install.packages :
  cannot open URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/stringi_1.1.5.zip': HTTP status was '404 Not Found'
Error in download.file(url, destfile, method, mode = "wb", ...) : 
  cannot open URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/stringi_1.1.5.zip'
Warning in install.packages :
  download of package ‘stringi’ failed

How can I fix this so I can finally knit my .RMD in peace?

Edit (Solution):

  1. Download windows binary (r-release: stringi_1.1.6.zip) from https://cran.r-project.org/web/packages/stringi/index.html
  2. Install by > install.packages(".../Downloads/stringi_1.1.6.zip", repos = NULL, type = "source")
like image 647
user47376 Avatar asked Nov 19 '17 13:11

user47376


People also ask

Why is my RStudio not installing packages?

Make sure that the package is available through CRAN or another repository, that you're spelling the name of the package correctly, and that it's available for the version of R you are running.

How do I install an R package in Windows?

Click on "Download R for Windows". Click on "install R for the first time" link to download the R executable (.exe) file. Run the R executable file to start installation, and allow the app to make changes to your device. Select the installation language.


1 Answers

Simplest solution is download .zip or .tar.gz file from here and install it choosing in RStudio Tool -> Install packages..., change Install from: to Package Archive File and choose your downloaded file.

like image 91
Glaud Avatar answered Sep 21 '22 11:09

Glaud