Skip to content

Commit

Permalink
Update readme with link to cache article.
Browse files Browse the repository at this point in the history
  • Loading branch information
rfsaldanha committed Apr 15, 2024
1 parent 4fc4624 commit e896b48
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
9 changes: 2 additions & 7 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,15 @@ The function will create a cache on your machine with all accessed files, avoidi

By default, the cache is stored on a temporary folder that is cleaned when the R session is ended.

To use a persistent cache, available across sessions and reboots, you can set an environment variable. First, edit your environment configuration file with.

```{r, eval=FALSE}
usethis::edit_r_environ()
```
To use a persistent cache and other options, [check this article](https://rfsaldanha.github.io/zendown/articles/cache_options.html).

And add the following line:

```{r}
zendown_cache_type = "persistent"
```

Save the file and restart R. On RStudio: Session -> Restart R
Save the file and restart R. On RStudio: Session -\> Restart R

After this, all cache will be persistent. The package provides a functions to delete a specific Zenodo deposit cache `?delete_mirror`.

Expand Down Expand Up @@ -108,7 +104,6 @@ zen_file(10889682, "total_precipitation_2023-09-01_2023-09-30_day_sum.nc") |>
terra::plot(1)
```


## zen4R

To explore the Zenodo API possibilities to problematically store files and other procedures, check the [zen4R](https://github.com/eblondel/zen4R) package.
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ Deposition code: 10959197
With the deposit code and the desired file name, you can just access the
file with the `zen_file` function.

#> ℹ The cache of deposit 10959197 was deleted

``` r
my_iris <- zen_file(deposit_id = 10959197, file_name = "iris.rds") |>
readRDS()
Expand All @@ -62,13 +64,8 @@ files, avoiding re-downloading them when you access some file again.
By default, the cache is stored on a temporary folder that is cleaned
when the R session is ended.

To use a persistent cache, available across sessions and reboots, you
can set an environment variable. First, edit your environment
configuration file with.

``` r
usethis::edit_r_environ()
```
To use a persistent cache and other options, [check this
article](https://rfsaldanha.github.io/zendown/articles/cache_options.html).

And add the following line:

Expand Down Expand Up @@ -126,7 +123,7 @@ zen_file(10889682, "total_precipitation_2023-09-01_2023-09-30_day_sum.nc") |>
terra::plot(1)
```

<img src="man/figures/README-unnamed-chunk-9-1.png" width="100%" />
<img src="man/figures/README-unnamed-chunk-8-1.png" width="100%" />

## zen4R

Expand Down
Binary file added man/figures/README-unnamed-chunk-8-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e896b48

Please sign in to comment.