Skip to contents

Prints the two things a new user needs and offers to open the files they go in:

  • .Rprofile — the SpeedGoat package repository, so install.packages("spdgt.auth") resolves at all.

  • .Renviron — SPDGT_REGION, only if you work with the Canadian deployment.

Both files live in R's home directory, which is not always the shell's: on Windows it is usually Documents, so a file placed beside the shell's ~ is silently never read. usethis locates them properly, which is why this offers to open them rather than telling you a path to go and find.

It prints rather than writes. These are personal files that may already hold hand-written configuration, and silently appending to someone's .Rprofile is not a thing a package should do.

Usage

spdgt_setup(open = rlang::is_interactive())

Arguments

open

Logical. Offer to open the files. Defaults to TRUE in an interactive session. Requires usethis, which is a suggested dependency; without it the file paths are printed instead.

Value

Invisibly returns NULL. Called for its output.

See also

api_url() to confirm which region a session resolves to

Examples

spdgt_setup(open = FALSE)
#> 
#> ── Installing SpeedGoat packages ──
#> 
#> Add this to your .Rprofile:
#> options(repos = c(
#>   SPDGT = "https://nexus.spdgt.com/repository/public-group/",
#>   CRAN  = "https://cloud.r-project.org"
#> ))
#> Both entries are needed. `CRAN` is where dependencies come from, and R resolves
#> each package to the highest version across the repos you list.
#> 
#> ── Working with the Canadian deployment ──
#> 
#> Only if your projects live in Canada. Add this to your .Renviron, then restart
#> R:
#> SPDGT_REGION=ca
#> Leave it unset for the United States. Check it took effect with
#> `spdgt.auth::auth_status()`.