I have attempted to download R package memoise:
install.packages("memoise")
However, I have recevied the following error message:
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.0/memoise_0.1.zip'
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/bin/windows/contrib/3.0/memoise_0.1.zip'
Warning in install.packages :
download of package ‘memoise’ failed`
I am connected to the internet and the WWW. In addition, I am connected to a work network. I am using the RStudio IDE.
Does anyone have any advice for how I troubleshoot this problem?
as I can see there is no "memoise_0.1.zip" at http://cran.rstudio.com/bin/windows/contrib/3.0/ . However, there is the "memoise_0.2.1.zip" file.
What version of RStudio IDE are you using? Do you have memoise already installed? Maybe you should try to update the memoise package.
I returned to this problem this morning. I restarted RStudio and tried the following again:
install.packages("memoise")
This time I received the following response:
Installing package into ‘\\oxdc/userdata/jolyon.faria/Documents/R/win-library/3.0’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.0/memoise_0.2.1.zip'
Content type 'application/zip' length 16813 bytes (16 Kb)
opened URL
downloaded 16 Kb
This time it (unexpectedly) 'found' the correct webpage so problem solved. Thanks for your help.
Related
I am new to geospatial analysis in R as all of my previous experience is in bioinformatics work. I am attempting to install some of the basic geospatial packages, but am having some issues, specifically revolving around installing the package "sp". When attempt I install.packages("sp") I get the following result:
install.packages("sp")
Installing package into ‘C:/Users/LMetz/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/sp_1.4-7.zip'
Warning in install.packages :
cannot open URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/sp_1.4-7.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/4.1/sp_1.4-7.zip'
Warning in install.packages :
download of package ‘sp’ failed
It appears that the URL install.packages is trying to access to download the package no longer exists. Does anyone know what I need to do to fix this? Thanks.
Good afternoon. Recently I have encountered the problem with installing "mxnet" package. I have tried several variants of code, but neither of their actually installs this package.
1.
cran <- getOption("repos")
cran["dmlc"] <- "https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/15"
options(repos = cran)
install.packages("mxnet")
library(mxnet)
And get the error like this:
Error: package or namespace load failed for ‘mxnet’: package ‘mxnet’
was installed before R 4.0.0: please re-install it
install.packages("https://github.com/jeremiedb/mxnet_winbin/raw/master/mxnet.zip", repos = NULL)
Then I type library(mxnet) and get the error message as in p.1.
3.
cran <- getOption("repos")
cran["dmlc"] <- "https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23"
options(repos = cran)
library(devtools)
require(devtools)
install_version("DiagrammeR", version = "0.9.0", repos = "http://cran.us.r-project.org")
require(DiagrammeR)
install.packages("mxnet")
library(mxnet)
After executing this code I get the following error:
ERROR: failed to lock directory 'C:/Users/user/Documents/R/win-library/4.0' for modifying
Try removing 'C:/Users/user/Documents/R/win-library/4.0/00LOCK-rlang'
Error: Failed to install 'unknown package' from URL:
(converted from warning) installation of package ‘rlang’ had non-zero exit status
> install.packages("mxnet")
Warning in install.packages :
cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/src/contrib/PACKAGES.rds': HTTP status was '404 Not Found'
Warning in install.packages :
cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/src/contrib/PACKAGES.gz': HTTP status was '404 Not Found'
Warning in install.packages :
cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/src/contrib/PACKAGES': HTTP status was '404 Not Found'
Warning in install.packages :
unable to access index for repository https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/src/contrib:
cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/src/contrib/PACKAGES'
Installing package into ‘C:/Users/user/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/src/contrib/PACKAGES.rds': HTTP status was '404 Not Found'
Warning in install.packages :
cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/src/contrib/PACKAGES.gz': HTTP status was '404 Not Found'
Warning in install.packages :
cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/src/contrib/PACKAGES': HTTP status was '404 Not Found'
Warning in install.packages :
unable to access index for repository https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/src/contrib:
cannot open 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 R version 4.0.2)
Warning in install.packages :
cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/bin/windows/contrib/4.0/PACKAGES.rds': HTTP status was '404 Not Found'
Warning in install.packages :
cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/bin/windows/contrib/4.0/PACKAGES.gz': HTTP status was '404 Not Found'
Warning in install.packages :
cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/bin/windows/contrib/4.0/PACKAGES': HTTP status was '404 Not Found'
Warning in install.packages :
unable to access index for repository https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/bin/windows/contrib/4.0:
cannot open URL 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/23/bin/windows/contrib/4.0/PACKAGES'
In the end, mxnet package hasn't been installed in RStudio yet.
I have familizrized myself with MXNet package installation in R , but some of the instructions, given there, didn't bring any help. Other coincide with my code.
Could you, please, tell me, how to successfully install this package? What code should I run?
Thank you for your effort.
As there is no prebuilt MXNet binary available for the version of R that you are using, you will need to follow the build from source instructions. Please see https://mxnet.apache.org/versions/1.7.0/get_started/build_from_source
You can follow these instructions but use the 1.8.0rc2 release archive instead of 1.7.0 if you like.
This question is duplicate of R: namespace load failed for ‘mxnet’: package ‘mxnet’ was installed before R 4.0.0: please re-install it but can't be flagged as duplicate as there are no accepted answers.
I tried running getSymbols() from the famous library quantmod in R, but it didn't work. So I want to ask how to solve this problem.
The codes that I tried was the following :
library(quantmod)
getSymbols("AAPL")
Error in download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m, :
cannot open URL 'http://ichart.finance.yahoo.com/table.csv?s=AAPL&a=0&b=01&c=2007&d=4&e=30&f=2019&g=d&q=q&y=0&z=AAPL&x=.csv'
In addition: Warning message:
In download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m, :
InternetOpenUrl failed: '서버 이름이나 주소를 확인할 수 없습니다.'
getSymbols("AAPL", src="google")
Error in download.file(paste(google.URL, "q=", Symbols.name, "&startdate=", :
cannot open URL 'http://finance.google.com/finance/historical?q=AAPL&startdate=Jan+01,+2007&enddate=May+30,+2019&output=csv'
In addition: Warning message:
In download.file(paste(google.URL, "q=", Symbols.name, "&startdate=", :
cannot open URL 'http://finance.google.com/finance/historical?q=AAPL&startdate=Jan+01,+2007&enddate=May+30,+2019&output=csv': HTTP status was '403 Forbidden'
I have ever run this function on the same desktop(OS : Windows 8.1K, x64).
Thank you for telling me about the right lastest version, so I tried upgrading the package like the below, but to fail.
install.packages("quantmod")
It answered that it still calls v0.4-7.
Installing package into ‘C:/Users/fya/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
trying URL 'https://mran.revolutionanalytics.com/snapshot/2016-11-01/bin/windows/contrib/3.3/quantmod_0.4-7.zip'
Content type 'application/zip' length 472947 bytes (461 KB)
downloaded 461 KB
package ‘quantmod’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\***\AppData\Local\Temp\RtmpozsYvx\downloaded_packages
Is there more effective way for solving this problem?
I referred to another stackoverflow page about upgrading packages in R :
https://stackoverflow.com/questions/21461649/how-to-update-a-package-in-r
The latest version of quantmod on CRAN is 0.4-14, so you need to upgrade. Also note that Google Finance no longer provides any data.
You're using MRAN and R-3.3.x. MRAN may have quantmod_0.4-14, but they apparently do not for older R versions. And CRAN only provides Windows binaries for the latest minor version of R (currently 3.6.x).
You can install the latest quantmod from CRAN on R-3.3.x, but you will have to do some of the steps manually. Download quantmod_0.4-14 from CRAN then call:
install.packages("quantmod_0.4-14.tar.gz", repos = NULL, type = "source")
I think that should work. Comment if you still have issues.
When I tried to install the package coxphf, the following error appeared.
Please let me know how to solve this:
install.packages("coxphf")
> Installing package into ‘C:/Users/User/R/win-library/3.4’
> (as ‘lib’ is unspecified)
> trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/coxphf_1.12.zip'
Warning in install.packages :
cannot open URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/coxphf_1.12.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/coxphf_1.12.zip'
Warning in install.packages :
download of package ‘coxphf’ failed
Looks like the package isn't available on CRAN at that address.
After digging around, I found the package here: https://cran.rstudio.com/bin/windows/contrib/3.4/coxphf_1.13.zip
Download it and follow instructions here:
http://stat.columbia.edu/~gelman/bugsR/alternate_install.html
It's not expected behavior though, I'm not sure what's causing it, but this workaround will do fine for now
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"