Unable to install [R] package slidify on Windows - r

I downloaded ramnathv-slidify-4260813.zip and copied it into C:/Users//Documents/R/win-library/3.5
On Windows 7 64bit machine
In Rstudio with Admin privileges I ran this:
install.packages("~/R/win-library/3.5/ramnathv-slidify-4260813.zip", repos = NULL, type = "win.binary")
Installing package into ‘C:/Users//Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
Warning in install.packages :
cannot open compressed file 'ramnathv-slidify-4260813/DESCRIPTION', probable reason 'No such file or directory'
Error in install.packages : cannot open the connection
How can I bypass the Error message above and install 'slidify' successfully on my machine?
thank you

Managed to install by first downloading 'slidify' and 'slidifyLibraries' gz files and then running: *install.packages("C:/Users/<...>/Downloads/ramnathv-slidify-v0.3.3-154-g1dd41a3.tar.gz", repos = NULL, type = "source")
install.packages("C:/Users/<...>/Downloads/slidifyLibraries-master.zip", repos = NULL, type = "win.binary") commands in RStudio
Alternatively, in RStudio this can be done via GUI: click Packages > Install Packages > in Install Packages window select Install from: package archive ... > then Browse to the location you downloaded your file to > click Install.
Thanks

Related

Unable to install bbplot package in R

I am unable to install "bbplot" package, I thought to install through devtools package, but it is not downloading as well. The following error appears while installing "devtools";
Warning in install.packages :
error 1 in extracting from zip file
Warning in install.packages :
cannot open compressed file 'DT/DESCRIPTION', probable reason 'No such file or directory'
Error in install.packages : cannot open the connection
I have also tried to download using the following method but no success:
path <- "https://github.com/bbc/bbplot"
install.packages(path, repos = NULL, type = "source")
The following error appears, while installing through above method:
Error in getOctD(x, offset, len) : invalid octal digit
Warning in install.packages :
installation of package ‘C:/Users/work/AppData/Local/Temp/RtmpyC6V4z/downloaded_packages/bbplot’ had non-zero exit status
For the beginning user who is not familiar with loading packages into R Studio, you will need to do the following in this order: 1) install the devtools package. 2) Restart R Studio 3) Open the devtools library 4) Use devtools to install the BBplot package 5) Run the bbplot package
install.packages("devtools") # Adds the devtools package to R Studio library
# Reboot Computer
libaray(devtools) # opens the devtools
devtools::install_github('bbc/bbplot') # Uses devtools to install bbplot package
library(bbplot) # opens bbplot

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.

R Studio installing stringi fails

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.

Issue with package installation of gganimate

I want to install gganimate, but as I work behind a firewall in a corporate setting, install_github is not an option as it returns:
install_github("dgrtwo/gganimate")
Error in curl::curl_fetch_disk(url, x$path, handle = handle) :
Couldn't resolve host nam
I have tried to install it mannually, but the result I get is:
install.packages("C:/Users/stefanj/Downloads/gganimate.zip", repos = NULL, type = "win.binary")
Installing package into ‘C:/Users/stefanj/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
Warning in install.packages :
cannot open compressed file 'gganimate/DESCRIPTION', probable reason 'No such file or directory'
Error in install.packages : cannot open the connection
I found a work-around for a different library (rCharts):
library(downloader)
download("https://github.com/ramnathv/rCharts/archive/master.tar.gz", "rCharts.tar.gz")
install.packages("rCharts.tar.gz", repos = NULL, type = "source")
But I can't find the tar.gz file for gganimate. I only have a zip file. Anyone knows how I can install source from a zip or where I can find the actuall tar.gz file for gganimate?
I have tried
install.packages("gganimate.zip", repos = NULL, type = "source")
but it failed.

Issue in installation of mxnet package in R

mxnet package is not installing in r (on windows 10) when I follow the steps given in its documentation.
install.packages("drat", repos="https://cran.rstudio.com")
drat:::addRepo("dmlc")
install.packages("mxnet")
It gives the following result
Installing package into ‘C:/Users/Ashish/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified) Warning in install.packages : cannot open
URL 'http://dmlc.github.io/drat/bin/windows/contrib/3.3/PACKAGES.gz':
HTTP status was '404 Not Found' Warning in install.packages : cannot
open URL
'http://dmlc.github.io/drat/bin/windows/contrib/3.3/PACKAGES': HTTP
status was '404 Not Found' Warning in install.packages : unable to
access index for repository
http://dmlc.github.io/drat/bin/windows/contrib/3.3: cannot open URL
'http://dmlc.github.io/drat/bin/windows/contrib/3.3/PACKAGES' Package
which is only available in source form, and may need compilation of
C/C++/Fortran: ‘mxnet’ Do you want to attempt to install these from
sources? y/n: y installing the source package ‘mxnet’
trying URL 'http://dmlc.github.io/drat/src/contrib/mxnet_0.5.tar.gz'
Warning in install.packages : cannot open URL
'http://dmlc.github.io/drat/src/contrib/mxnet_0.5.tar.gz': HTTP status
was '404 Not Found' Error in download.file(url, destfile, method, mode
= "wb", ...) : cannot open URL 'http://dmlc.github.io/drat/src/contrib/mxnet_0.5.tar.gz' Warning in
install.packages : download of package ‘mxnet’ failed
Kindly help me resolve this issue. I'm using R version 3.3.0. Is there any other way of installing it in R?
I was able to install it successfully by first downloading its zip file from the following link
https://github.com/dmlc/drat/tree/gh-pages/bin/windows/contrib/3.2
and then installing it using RStudio.
I hope this answer will help anyone else facing the same problem.
I had the same issue and was able to resolve it by following the instructions on this page and choosing the correct OS, Language and CPU/GPU options:
http://mxnet.io/get_started/install.html
The only thing that worked for me was to download the mxnet.zip file to a folder, (set it as working directory) and type:
install.packages("mxnet.zip", repos=NULL, type="win.binary")
You can try using different repo in repos.
Otherwise you can download the drat package along with dependencies and install manually.
Check if these URLs are accessible from your machine or not.
Following links will be helpful for you:
http://mxnet-bing.readthedocs.io/en/latest/build.html#r-package-installation
https://github.com/dmlc/mxnet/issues/1085
The more up-to-date Installation Guide is currently located here:
http://mxnet.io/get_started/setup.html#installing-mxnet
I found the paragraph about the installation of the R-package on Windows to be very well written.
By the way, the install.packages("mxnet") command installs a very long tool chain, so it might happen that a package is currently not indexed correctly in the dmlc-repo (i.e. because it was just updated to a newer version on CRAN): Error: package <pkgname> is not available for R version 3.3.1 So you might want to install the "offending" package from the CRAN (or download the sourcecode and use something like install.packages(file.choose(), repos = NULL, type = "source")), then continue with another call to install.packages("mxnet").
try these commands to install mxnet package:--
cran <- getOption("repos")
cran["dmlc"] <- "https://s3-us-west-2.amazonaws.com/apache-mxnet/R/CRAN/"
options(repos = cran)
install.packages("mxnet")

Resources