1 Install tlverse
software
The tlverse
ecosystem of packages are currently hosted at
https://github.com/tlverse, not fully available on
CRAN yet. You can use the usethis
package to install all tlverse
packages or
specific packages:
install.packages("devtools")
# install all tlverse packages
devtools::install_github("tlverse/tlverse")
# install a specific package (example is sl3)
devtools::install_github("tlverse/sl3")
# install a specific branch of package (example is devel branch of sl3)
# (first clear workspace and restart R)
devtools::install_github("tlverse/sl3@devel")
The tlverse
packages depend on other packages that are also hosted on GitHub.
Because of this, you may see the following error:
Error: HTTP error 403.
API rate limit exceeded for 71.204.135.82. (But here's the good news:
Authenticated requests get a higher rate limit. Check out the documentation
for more details.)
Rate limit remaining: 0/60
Rate limit reset at: 2019-03-04 19:39:05 UTC
To increase your GitHub API rate limit
- Use `usethis::browse_github_pat()` to create a Personal Access Token.
- Use `usethis::edit_r_environ()` and add the token as `GITHUB_PAT`.
This just means that R
tried to install too many packages from GitHub in too
short of a window. To fix this, you need to tell R
how to use GitHub as your
user (you’ll need a GitHub user account). Follow these two steps:
Type
usethis::browse_github_pat()
in yourR
console, which will direct you to GitHub’s page to create a New Personal Access Token (PAT).Create a PAT simply by clicking “Generate token” at the bottom of the page.
Copy your PAT, a long string of lowercase letters and numbers.
-
Type
usethis::edit_r_environ()
in yourR
console, which will open your.Renviron
file in the source window of RStudio.- If your
.Renviron
file does not pop-up after callingusethis::edit_r_environ()
; then try inputtingSys.setenv(GITHUB_PAT = "yourPAT")
, replacing your PAT with inside the quotes. If this does not error, then skip to step 8.
- If your
In your
.Renviron
file, typeGITHUB_PAT=
and then paste your PAT after the equals symbol with no space.In your
.Renviron
file, press the enter key to ensure that your.Renviron
ends with a new line.Save your
.Renviron
file. The example below shows how this syntax should look.
GITHUB_PAT=yourPAT
- Restart R. You can restart
R
via the drop-down menu on RStudio’s “Session” tab, which is located at the top of the RStudio interface. You have to restartR
for the changes to take effect!
After following these steps, you should be able to successfully install the package which threw the error above.