Rate limited by GitHub when using remotes::install_github()

When you use remotes::install_github() too often in a short span of time, GitHub may rate limit you. This means you can't use install the package you wanted without waiting for the rate limit to end. One way around this (and to prevent getting rate limited) is to simply clone the repo and use remotes::install_local()!

To illustrate, I'll start RStudio Server using Docker:

docker run --rm -e PASSWORD=password -p 8877:8787 davetang/rstudio:4.4.0

Next open up Firefox and enter http://localhost:8877/ and enter rstudio and password for the Username: and Password:, respectively.

Open the terminal in RStudio and clone the R package hosted on GitHub; replace the URL with your package of interest:

git clone https://github.com/davetang/importbio

Then click on Console to go back to the R console and install the {remotes} package.

install.packages("remotes")

Use remotes::install_local to install the package from the cloned repo.

remotes::install_local("~/importbio/")

Check to see if you can load the package.

library("importbio")

That's it!

packageVersion("importbio")
[1] ‘0.1.0’
Print Friendly, PDF & Email



Creative Commons License
This work is licensed under a Creative Commons
Attribution 4.0 International License
.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.