Error installing package mxnet in r 4.0.3 on Mac - r

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

Related

error message while installing R Markdown on R version 4.0.1 on Windows

I am new to R and trying to install R Markdown on RStudio but it keeps giving me error messages eg
Warning in install.packages :
package ‘(tools)’ is not available (for R version 4.0.1)
Warning in install.packages :
unable to access index for repository https://cran.rstudio.com/bin/windows/contrib/4.0:
cannot open URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/PACKAGES'
Are you sure you have internet? try install.packages("Rmarkdown", dep = TRUE) you may also need to install latex for your system

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.

Have trouble installing ggExtra in RStudio

When I try to library "ggExtra" in RStudio with code below:
install.packages("ggExtra")
what displayed is:
Warning in install.packages :
unable to access index for repository
https://cran.rstudio.com/src/contrib:
cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES'
Warning in install.packages :
unable to access index for repository
http://www.stats.ox.ac.uk/pub/RWin/src/contrib:
cannot open URL
'http://www.stats.ox.ac.uk/pub/RWin/src/contrib/PACKAGES'
Installing package into ‘C:/Users/Kyrie NI/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
I also tried:
install.packages("devtools")
devtools::install_github("daattali/ggExtra")
And I received the same results. What is wrong with my operation, or the package?
I had a similar problem using R 3.5.0, and found an online solution working as following. It seems I needed to set a default CRAN mirror by adding the first line. Then I update my R into version 3.5.1 to be able to library it. I hope it helps you too.
options(repos = c(CRAN = "http://cran.rstudio.com"))
install.packages("ggExtra")
The original idea comes from:
https://support.rstudio.com/hc/en-us/community/posts/205198138-packages-installation-problem

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