Skip to content

Commit

Permalink
Add note explaining the double key in options()
Browse files Browse the repository at this point in the history
  • Loading branch information
coatless committed Jan 25, 2024
1 parent 8081912 commit 1c98097
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,14 @@ options(
webr::install("pkgname")
```

> [!NOTE]
>
> This is different than the `repos` option one would usually set since
> webR only checks the [`webr_pkg_repos`
> key](https://github.com/r-wasm/webr/blob/010223433079d1a9ef3eb9bbf73d8eccb38e6adc/packages/webr/R/install.R#L23);
> however, other R functions like `available.packages()` check the
> `repos` parameter.
Alternatively, the `repos` can be specified each time:

``` r
Expand Down
5 changes: 5 additions & 0 deletions README.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@ options(
webr::install("pkgname")
```

:::{.callout-note}
This is different than the `repos` option one would usually set since webR only checks the [`webr_pkg_repos` key](https://github.com/r-wasm/webr/blob/010223433079d1a9ef3eb9bbf73d8eccb38e6adc/packages/webr/R/install.R#L23); however, other R functions like `available.packages()`
check the `repos` parameter.
:::

Alternatively, the `repos` can be specified each time:

```r
Expand Down

0 comments on commit 1c98097

Please sign in to comment.