Error message in installing github projects - r

I am trying to install the ggmap latest version package from github using
devtools::install_git("dkahle/ggmap") and it shows me this error. Can anyone help me out?
Thank you
Downloading git repo dkahle/ggmap
Error in git2r::clone(x$url, bundle, credentials = x$credentials, progress = FALSE) :
Error in 'git2r_clone': unsupported URL protocol
In addition: Warning message:
In git2r::remote_ls(remote$url, credentials = remote$credentials) :
Error in 'git2r_remote_ls': unsupported URL protocol

Related

Issues installing CausalImpact in R

I am trying to install the Causal Impact package in R and get the following warnings/errors:
install.packages("CausalImpact")
--- Please select a CRAN mirror for use in this session ---
Warning: failed to download mirrors file (cannot open URL 'https://cran.r-project.org/CRAN_mirrors.csv'); using local file 'C:/Users/nlwes/AppData/Local/Programs/R/R-4.2.0/doc/CRAN_mirrors.csv'
Warning: unable to access index for repository https://mirror.dogado.de/cran/src/contrib:
cannot open URL 'https://mirror.dogado.de/cran/src/contrib/PACKAGES'
Warning: unable to access index for repository https://mirror.dogado.de/cran/bin/windows/contrib/4.2:
cannot open URL 'https://mirror.dogado.de/cran/bin/windows/contrib/4.2/PACKAGES'
Warning messages:
1: In download.file(url, destfile = f, quiet = TRUE) :
URL 'https://cran.r-project.org/CRAN_mirrors.csv': status was 'SSL peer certificate or SSH remote key was not OK'
2: package ‘CausalImpact’ 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
Anybody an idea how to fix the issue so I can install the package?

Problems installing vqv/ggbiplot

I was able to install successfully library(devtools), but when trying to install:
install_github("vqv/ggbiplot")
Downloading GitHub repo vqv/ggbiplot#master
Error in utils::download.file(url, path, method = method, quiet = quiet, :
cannot open URL 'https://api.github.com/repos/vqv/ggbiplot/tarball/master'
didn´t work!
Does anyone know how to solve this problem?

Issues in installation of dev version of ggmap library in R

I am using RStudio to with R 3.5.2 installed in my Windows 7 machine.
I am trying to use ggmap to load google map based on certain parameters but this fails because the authentication key is not provided and a 403 error as below occurs
Error in download.file(url, destfile = tmp, quiet = !messaging, mode = "wb") :
cannot open URL 'http://maps.googleapis.com/maps/api/staticmap?>center=29.763284,-95.363271&zoom=4&size=640x640&scale=2&maptype=hybrid&sensor=>false'
In addition: Warning message:
In download.file(url, destfile = tmp, quiet = !messaging, mode = "wb") :
cannot open URL 'http://maps.googleapis.com/maps/api/staticmap?>center=29.763284,-95.363271&zoom=4&size=640x640&scale=2&maptype=hybrid&sensor=>false': HTTP status was '403 Forbidden'
A lot of posts suggests installing a dev version of ggmap after which you can use the maps API key by using
// save api key
register_google(key = "YOUR_API_KEY")
Thus I am trying to install the dev version using,
devtools::install_github("dkahle/ggmap")
but on trying to install the dev version of ggmap the error is as below
devtools::install_github("dkahle/ggmap")
Error in curl::curl_fetch_memory(url, handle = h) :
schannel: next InitializeSecurityContext failed: SEC_E_UNTRUSTED_ROOT (0x80090325) - The certificate chain was issued by an authority that is not trusted.
any suggestions/help would be nice,
Thanks

Install scale in R

I try to install scale in R by:
devtools::install_github("scale",username="hadley/scale")
But
Downloading github repo hadley/scale/scale#master
Error in download(dest, src, auth) : client error: (404) Not Found
In addition: Warning message:
Username parameter is deprecated. Please use hadley/scale/scale
The general syntax of install_github function is:
install_github(repo)
where repo is in the format username/repository
The syntax of both username and repository should be checked, to avoid the message
Error in download(dest, src, auth) : client error: (404) Not Found
It is also a good practice to compare versions available on both GitHub and CRAN. In the case of identical versions available, the simplest would be:
install.packages(pkg, dependencies = TRUE)
where dependencies argument ensures the installation of all packages which pkg depends on/links to/imports/suggests.

R packrat init fails with: can't open url and no description file found

After installing packrat and running packrat::init() I get the following error which in my opinion is trying to reach a site which is no longer available, additionally some other errors which I'm not sure are being generated by the first one.
Environment:
- OS X 10.10.3
- R version 3.2.0
- packrat 0.4.3
- cran (don't know how to get version for this one)
Fetching sources for packrat (0.4.3) ... OK (CRAN current)
Snapshot written to '/Users/user/RProjects/Data_Specialization/r_programming/packrat/packrat.lock'
Installing packrat (0.4.3) ... Error in download.file(url, destfile, method, mode = "wb", ...) :
cannot open URL 'http://cran.rstudio.com/src/contrib/packrat_0.4.3.tgz'
In addition: Warning message:
In download.file(url, destfile, method, mode = "wb", ...) :
cannot open: HTTP status was '404 Not Found'
Warning in download.packages(pkgs, destdir = tmpd, available = available, :
download of package ‘packrat’ failed
Error in hash(descFile) :
No DESCRIPTION file at path '/Users/user/RProjects/Data_Specialization/r_programming/packrat/lib/x86_64-apple-darwin13.4.0/3.2.0/packrat/DESCRIPTION'!
From what I've read in this issue its also worth noting that I've got Biocinstaller v1.18.1
Ok, so its a version compatibility issue. We need to install packrat from github like so:
if (!require("devtools")) install.packages("devtools")
devtools::install_github("rstudio/packrat")
Then packrat::init() works as expected.
More information on the repository site.
Credit goes to #kevinushey for resolving this issue.

Resources