outbreak-info / R-outbreak-info

R package to access the genomics and epidemiology data and Research Library metadata compiled and standardized on outbreak.info.
https://outbreak-info.github.io/R-outbreak-info/
MIT License
20 stars 10 forks source link

Installation failure #87

Closed Kanyerezi30 closed 2 years ago

Kanyerezi30 commented 2 years ago

Hello here, I am using R version 4.2.0 and I have failed to install the package. Below is the error message

Downloading GitHub repo outbreak-info/R-outbreak-info@HEAD Error in utils::download.file(url, path, method = method, quiet = quiet, : download from 'https://api.github.com/repos/outbreak-info/R-outbreak-info/tarball/HEAD' failed

flaneuse commented 2 years ago

@Kanyerezi30 thanks for the note. Are you using a Windows system? It looks like there may be some issues with using the remotes package (which is the source of the install_github command) with https requests.

RStudio has a series of suggestions. It sounds like adding this option worked for Windows users with other package installs:

options(download.file.method = "wininet")

Please let us know if this resolves the issue. Thanks!

Kanyerezi30 commented 2 years ago

I am using Ubuntu 18.04

flaneuse commented 2 years ago

Did you try adding options(download.file.method = "libcurl") as suggested in the RStudio article? I think this is an issue with the remotes package and https requests.

Kanyerezi30 commented 2 years ago

Thank you @flaneuse for your support

I have finally figured it out. Below is the procedure I have taken

On the command line: git clone https://github.com/outbreak-info/R-outbreak-info.git sudo apt install libudunits2-dev sudo apt install libgdal-dev

In R: install.packages("units", dependencies = T) install.packages("sf", dependencies = T) devtools::install_local("<path/to/repo/folder>")

It's working perfectly well now

flaneuse commented 2 years ago

Ah, glad you were able to figure it out! The sf installation can be a bit finicky -- maps in R always come with a hiccup or two. Thanks for posting the working solution.