R Studio installing stringi fails - r

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):
Download windows binary (r-release: stringi_1.1.6.zip) from https://cran.r-project.org/web/packages/stringi/index.html
Install by > install.packages(".../Downloads/stringi_1.1.6.zip", repos = NULL, type = "source")

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.

Related

Installing RStudioAMI on Amazon Web Services error:

I have set up an AWS and I am trying to install a package. I run the following but get an error.
> devtools::install_github("https://github.com/nwstephens/RStudioAMI.git")
Downloading GitHub repo nwstephens/RStudioAMI#master
✔ checking for file ‘/tmp/RtmpEH49ON/remotes33643b988bf8/nwstephens-RStudioAMI-8507ced/DESCRIPTION’
─ preparing ‘RStudioAMI’:
✔ checking DESCRIPTION meta-information ... OK
Warning in file(con, "r") :
cannot open file 'man': No such file or directory
ERROR
computing Rd index failed:cannot open the connection
Error in (function (command = NULL, args = character(), error_on_status = TRUE, :
System command error
Running also:
> install.packages("RStudioAMI")
Installing package into ‘/home/msmith/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘RStudioAMI’ is not available (for R version 3.4.4)
I have tried updating my R version.
> install.packages("installr")
Installing package into ‘/home/msmith/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘installr’ is not available (for R version 3.4.4)
I am not sure how I can proceed with this from here… Do you know of something I can run in the terminal to install this package?
EDIT: Using Ubuntu 18
Solved (I think)
I downloaded the package from GitHub: https://github.com/nwstephens/RStudioAMI
Uploaded this .zip to the server and then;
In R studio I created a new Project and then selected build -> Build Source Package which seemed to work.

I want to use the Corpus function, but I am unable to install the tm package for text mining in R 3.4.2

The error:
Warning in install.packages : cannot open URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/tm_0.7-1.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/tm_0.7-1.zip' Warning in install.packages : download of package ‘tm’ failed
It can happen sometimes. My suggestion is to download the .zip or .tar.gz file from CRAN and install it through the user interface:
Tools -> Install packages -> Install from: "Package Archive File"

R will not install packages

RStudio is not letting me install any new packages. As an example, I attempted to install "rio" today and got the following message:
install.packages("rio")
Installing package into ‘C:/Users/kjl5444/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependency ‘openxlsx’ is not available
There is a binary version available but the source version is later:
binary source needs_compilation
rio 0.4.0 0.5.5 FALSE
installing the source package ‘rio’
trying URL 'https://cran.rstudio.com/src/contrib/rio_0.5.5.tar.gz'
Content type 'application/x-gzip' length 390824 bytes (381 KB)
downloaded 381 KB
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
running command '"C:/Program Files/R/R-32~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\kjl5444\Documents\R\win-library\3.2" C:\Users\kjl5444\AppData\Local\Temp\RtmpaQwlLL/downloaded_packages/rio_0.5.5.tar.gz' had status 1
Warning in install.packages :
installation of package ‘rio’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\kjl5444\AppData\Local\Temp\RtmpaQwlLL\downloaded_packages’
> library(rio)
Error in library(rio) : there is no package called ‘rio’
Any help on deciphering and fixing this error?
While trying to install the rio package in Microsoft windows. I faced an error. In order to resolve that issue, I googled and came to this page.
I know this post is a bit old post but thought to share it for those who face a similar issue in installing this package.
Similar to this post:
Error: "there is no package called ..." and trying to use install.packages to solve it
I could only install rio when I used the command:
install.packages('rio', dependencies = TRUE, repos='http://cran.rstudio.com/')
Perhaps it can help you successfully install the required packages as it ensures that dependencies are also installed along with the required package.

Unable to install Rcpp package when loading forecast

When I try to load the forecast package it trows me the error that there is not Rcpp package which it depends on
by trying to install Rcpp package manually i get the following error
install.packages("Rcpp")
Installing package into ‘C:/Users/~~~’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
Rcpp 0.12.10 0.12.11 TRUE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/Rcpp_0.12.10.zip'
Warning in install.packages :
cannot open URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/Rcpp_0.12.10.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/Rcpp_0.12.10.zip'
Warning in install.packages :
download of package ‘Rcpp’ failed
This is a likely duplicate. You misunderstand the meaning of There is a binary version available but the source version is later..
Install from source, use a different mirror, or just wait.
The 0.12.11 binary is clearly there in Vienna and at the 0-cloud mirrors.

Getting a 404 error during installation of R gtools package

I'm getting a 404 error during the installation of the R gtools package:
> install.packages("gtools")
Installing package into ‘/Users/[...]/Library/R/3.1/library’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/gtools_3.4.2.tar.gz'
Warning in install.packages :
cannot open: HTTP status was '404 Not Found'
Error in download.file(url, destfile, method, mode = "wb", ...) :
cannot open URL 'http://cran.rstudio.com/src/contrib/gtools_3.4.2.tar.gz'
Warning in install.packages :
download of package ‘gtools’ failed
Apparently, the latest version is not 3.4.2, but 3.5.0 (see http://cran.r-project.org/web/packages/gtools/index.html), so I'm wondering if this explains the error. How do I install gtools (either 3.4.2 or 3.5.0 are fine)? My current setup is OS X Yosemite (10.10.3), R version 3.1.3, RStudio 0.99.437.
The version 3.5 should work with R 2.1 and higher. I would suggest that you download the package source tar.gz file available here and attempt to install using the command below:
install.packages("path_to_your_file/gtools_3.5.0.tar.gz", repos = NULL, type = "source")

Resources