-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into vignettes-cleanup-logo-fix
- Loading branch information
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
execute: | ||
eval: false | ||
--- | ||
|
||
|
||
## Set the data directory {#set-data-folder} | ||
|
||
Choose where `{spanishoddata}` should download (and convert) the data by setting the `SPANISH_OD_DATA_DIR` environment variable with the following command: | ||
|
||
```{r} | ||
Sys.setenv(SPANISH_OD_DATA_DIR = "~/spanish_od_data") | ||
``` | ||
|
||
The package will create this directory if it does not exist on the first run of any function that downloads the data. | ||
|
||
<details><summary>Setting data directory for advanced users</summary> | ||
|
||
To permanently set the directory for all projects, you can specify the data directory globally by setting the `SPANISH_OD_DATA_DIR` environment variable, e.g. with the following command: | ||
|
||
```{r} | ||
#| eval: false | ||
usethis::edit_r_environ() | ||
# Then set the data directory globally, by typing this line in the file: | ||
``` | ||
|
||
``` | ||
SPANISH_OD_DATA_DIR = "~/spanish_od_data" | ||
``` | ||
|
||
You can also set the data directory locally, just for the current project. Set the 'envar' in the working directory by editing `.Renviron` file in the root of the project: | ||
|
||
```{r} | ||
#| eval: false | ||
file.edit(".Renviron") | ||
``` | ||
|
||
|
||
</details> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters