Install packages from GitHub
When the visibility of a repository containing an R package is set to internal or private, you need to authenticate to GitHub to access it from R. Otherwise, you will get a 404 error.
remotes package and the
renv package allow you to install R packages using the same SSH credentials you use to close repositories from GitHub.
To install a package from an internal or private repository using
remotes, you can use the following code:
Alternatively, if you are using
renv, you can use the following code:
In both cases, you should replace
repository-name with the name of your repository.
You can use the same approach to install packages from any other public repository.
This page was last reviewed on 30 January 2023. It needs to be reviewed again on 30 January 2024 by the page owner #analytical-platform-support .
This page was set to be reviewed before 30 January 2024 by the page owner #analytical-platform-support. This might mean the content is out of date.