R configuration for packages
install.packages(c("devtools", "usethis", "testthat", "reprex", "pkgdown"))
git_sitrep() > library(usethis) > git_sitrep() Git user * Name: 'Amelia McNamara' * Email: 'amelia.mcnamara@stthomas.edu' * Vaccinated: TRUE usethis + git2r * Default usethis protocol: https * git2r supports SSH: FALSE * Credentials: '<usethis + git2r default behaviour>' GitHub * Personal access token: '<found in env var>' * User: 'AmeliaMN' * Name: 'Amelia McNamara' Repo ℹ No active usethis project.
If your name, email, and vaccinate aren’t set: library("usethis") use_git_config(user.name = "Amelia McNamara", user.email = "amelia.mcnamara@stthomas.edu") git_vaccinate()
git_sitrep() > library(usethis) > git_sitrep() Git user * Name: 'Amelia McNamara' * Email: 'amelia.mcnamara@stthomas.edu' * Vaccinated: TRUE usethis + git2r * Default usethis protocol: https * git2r supports SSH: FALSE * Credentials: '<usethis + git2r default behaviour>' GitHub * Personal access token: '<found in env var>' * User: 'AmeliaMN' * Name: 'Amelia McNamara' Repo ℹ No active usethis project.
To get here, we need to set our Github PAT • Open .Renviron, with edit_r_environ() • Add some generic code (I provided Give it a new an example on the course site) name, leave the default check • Go find your GitHub access token, boxes, scroll down using browse_github_pat() and generate token • Copy the token from GitHub • Paste into your .Renviron (make sure there’s a newline after it), save .Renviron • Restart R (Session -> Restart R)
git_sitrep() > library(usethis) > git_sitrep() Git user * Name: 'Amelia McNamara' * Email: 'amelia.mcnamara@stthomas.edu' * Vaccinated: TRUE usethis + git2r * Default usethis protocol: https * git2r supports SSH: FALSE * Credentials: '<usethis + git2r default behaviour>' GitHub * Personal access token: '<found in env var>' * User: 'AmeliaMN' * Name: 'Amelia McNamara' Repo ℹ No active usethis project.
edit_r_profile() • Open .Rprofile, with edit_r_profile() • Add some generic code (I provided an example on the course site) • Edit your name and email address, make sure the file ends with a newline, save .Rprofile • Restart R (Session -> Restart R)
git_sitrep() > library(usethis) > git_sitrep() Git user * Name: 'Amelia McNamara' * Email: 'amelia.mcnamara@stthomas.edu' * Vaccinated: TRUE usethis + git2r * Default usethis protocol: https * git2r supports SSH: FALSE * Credentials: '<usethis + git2r default behaviour>' GitHub * Personal access token: '<found in env var>' * User: 'AmeliaMN' * Name: 'Amelia McNamara' Repo ℹ No active usethis project.
Recommend
More recommend