Skip to content

Commit

Permalink
minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mmachir committed Sep 23, 2024
1 parent 4bd23a8 commit 1858d57
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/auth/storing-credentials.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ The packages in the R-ArcGIS Bridge rely heavily on **environment variables**. E

## Environment variables

The package `{arcgisutils}` is responsible for handling authorization for all of the R packages. With it, there are a number of different mechanism for authorizing each requiring a different combination of environment variables.
The package `{arcgisutils}` is responsible for handling authorization for all of the R packages. With it, there are a number of different mechanisms for authorizing each requiring a different combination of environment variables.

Environment variables are fetched using `Sys.getenv()`. They are key-value pairs. For example, to find the path of R run
Environment variables are fetched using `Sys.getenv()`. They are key-value pairs. For example, to find the path of R run:

```{r}
Sys.getenv("R_HOME")
```

Or to set a value use `Sys.setenv()`
Or to set a value use `Sys.setenv()`:

```{r}
Sys.setenv("ANSWER_TO_EVERYTHING" = 42)
Expand All @@ -31,7 +31,7 @@ Sys.getenv("ANSWER_TO_EVERYTHING")
Environment variables should _**never**_ be included in your code.
We recommend using an `.Renviron` file at minimum to store your credentials.

You can use the `usethis` to edit the file. Ensure it is installed and run the following in your text editor:
You can use the `usethis` package to edit the file. Ensure it is installed and run the following in your text editor:

:::{.callout-warning}
If you modify environment variables you will need to restart your R session for the change to be registered.
Expand Down

0 comments on commit 1858d57

Please sign in to comment.