r configuration for packages install packages c devtools
play

R configuration for packages - PowerPoint PPT Presentation

R configuration for packages install.packages(c("devtools", "usethis", "testthat", "reprex", "pkgdown")) git_sitrep() > library(usethis) > git_sitrep() Git user * Name: 'Amelia McNamara'


  1. R configuration for packages

  2. install.packages(c("devtools", "usethis", "testthat", "reprex", "pkgdown"))

  3. 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.

  4. 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()

  5. 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.

  6. 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)

  7. 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.

  8. 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)

  9. 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