MXNet package installation in R - r

I get plenty of trouble when trying to install MXNet package in R
I am using the 3.4.0 version of R and I am on windows 10 CPU intel i3, 64bits x64-based processor.
I get prompted:
install.packages("mxnet")
Warning in install.packages :
cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/src/contrib/PACKAGES.rds': HTTP status was '404 Not Found'
Installing package into ‘C:/Users/los40/OneDrive/Documentos/R/win-library/3.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘mxnet’ is not available (for R version 3.4.0)
Warning in install.packages :
cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.4/PACKAGES.rds': HTTP status was '404 Not Found'
I've tried downloading the .rar files provided here. I decompress one and get the folder where it says "R package" attempting to install it by using:
> install.packages('R.package.rar', lib='D:/mxnet',repos = NULL)
Error in install.packages : type == "both" cannot be used with 'repos = NULL'
> install.packages('R.package.rar', lib='D:/mxnet')
Warning in install.packages :
package ‘R.package.rar’ is not available (for R version 3.4.0)
The guide found in http://mxnet.io/get_started/windows_setup.html makes no sense to me since I cannot find the file required in the steps for installing the prebuild package on windows called setupenv.cmd

For mxnet package install in R using this command for only CPU
cran <- getOption("repos")
cran["dmlc"] <- "https://s3-us-west-2.amazonaws.com/apache-mxnet/R/CRAN/"
options(repos = cran)
install.packages("mxnet",dependencies = T)
library(mxnet)

Please try the following line:
cran <- getOption("repos")
cran["dmlc"] <- "https://s3.amazonaws.com/mxnet-r/"
options(repos = cran)
install.packages("mxnet")

For windows, if you want to install mxnet. Use the below commmand:
cran <- getOption("repos")
cran["dmlc"] <- "https://s3-us-west-2.amazonaws.com/apache-mxnet/R/CRAN/"
options(repos = cran)
install.packages("mxnet",dependencies = T)
library(mxnet)

Related

Error installing package mxnet in r 4.0.3 on Mac

I need to install the package MXNET on a Mac OS.
I have tried
install.packages("mxnet")
and get the following error
Warning in install.packages :
unable to access index for repository https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/src/contrib:
impossibile aprire URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/src/contrib/PACKAGES'
Warning in install.packages :
unable to access index for repository https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/src/contrib:
impossibile aprire URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/src/contrib/PACKAGES'
Warning in install.packages :
package ‘mxnet’ is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
Warning in install.packages :
unable to access index for repository https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/bin/macosx/contrib/4.0:
impossibile aprire URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/bin/macosx/contrib/4.0/PACKAGES'
Online solutions do not seem to work for my version of r and I keep getting the same error message as above.
I tried specifying the repository as follows with no luck
cran <- getOption("repos")
cran["dmlc"] <- "https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23"
options(repos = cran)
install.packages("mxnet")
Another option I tried is
install.packages("drat", repos="https://cran.rstudio.com")
drat:::addRepo("dmlc")
install.packages("mxnet")
require(devtools)
install_version("DiagrammeR", version = "0.8.1", repos = "http://cran.us.r-project.org")
require(mxnet)
This does not return an error when installing, but if I run something as easy as
mx.set.seed(0)
I get a message saying there is no function mx.set.seed
Does someone know if I can download a zip file for the package and import it manually into r, or if there is a simpler way of doing this?
Thank you

Package ‘Rstem’ is not available (for R version 3.5.1)

I am trying to install the Rstem package, but I am getting the message that there is no version available for the version of R 3.5.1. I'm using the macOs El Captain.
The error is:
> install.packages('Rstem', repos = 'https://cran.r-project.org/src/contrib/Archive/Rstem/Rstem_0.4-1.tar.gz')
Installing package into ‘/Users/ls_rafael/Library/R/3.5/library’
(as ‘lib’ is unspecified)
Warning in install.packages :
unable to access index for repository https://cran.r-project.org/src/contrib/Archive/Rstem/Rstem_0.4-1.tar.gz/src/contrib:
cannot open URL 'https://cran.r-project.org/src/contrib/Archive/Rstem/Rstem_0.4-1.tar.gz/src/contrib/PACKAGES'
Warning in install.packages :
package ‘Rstem’ is not available (for R version 3.5.1)
Warning in install.packages :
unable to access index for repository https://cran.r-project.org/src/contrib/Archive/Rstem/Rstem_0.4-1.tar.gz/bin/macosx/el-capitan/contrib/3.5:
cannot open URL 'https://cran.r-project.org/src/contrib/Archive/Rstem/Rstem_0.4-1.tar.gz/bin/macosx/el-capitan/contrib/3.5/PACKAGES'
I already tried the suggested options in this link issues in installing Rstem package and also downloading the package locally from the official website Rstem Package, but the result is also unsatisfactory.
I'm studying how to do an sentiment analysis with Twitter data. I would like to know if there is any alternative to this package or if there is any trick to install it.
RStem package has been removed from the CRAN repository. You can download using the following command:-
install.packages('Rstem', repos = "http://www.omegahat.net/R")
Make sure you have RTools installed on your machine. You can download it from this link -
Building R for Windows
RStem is now provided by OmegaHat.
Try the command below:
install.packages("Rstem", repos = "http://www.omegahat.net/R", type = "source")

Error in library(mxnet) : there is no package called ‘mxnet’

I started my mxnet package installation for R in ubuntu with the following command
install.packages("drat", repos="https://cran.rstudio.com")
drat:::addRepo("dmlc")
install.packages("mxnet")
while executing this command I got the following warning
Warning in install.packages :
package ‘mxnet’ is not available (for R version 3.4.4)
Then I went for the command
cran <- getOption("repos")
cran["dmlc"] <- "https://s3-us-west-2.amazonaws.com/apache-mxnet/R/CRAN/"
options(repos = cran)
install.packages("mxnet",dependencies = T)
At that time I got the warning
Warning in install.packages :
download of package ‘mxnet’ failed
For the first time I got installed the package ,but when I calling library(mxnet) I got the waring Error in library(mxnet) : there is no package called ‘mxnet’.After that I tried the same command above again ,at that time I got this error
Warning in install.packages :
download of package ‘mxnet’ failed
Please help me to solve this problem..
Download the mxnet.zip file to a folder, set it as working directory and then run:
install.packages("mxnet.zip", repos=NULL, type="win.binary")
You'll need to install like this:
git clone --recursive https://github.com/apache/incubator-mxnet.git mxnet
cd mxnet/docs/install
./install_mxnet_ubuntu_python.sh
./install_mxnet_ubuntu_r.sh
More details in the comment.

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.

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