Skip to content

Commit

Permalink
Add renv instructions to README (#23)
Browse files Browse the repository at this point in the history
* Add renv instructions

* Ignore `calypso` for renv

* Correct use of `dev = TRUE` for renv calls
  • Loading branch information
milanmlft authored Aug 16, 2024
1 parent 3a84b6f commit d1415c2
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,29 @@ as it has good support for R package development and Shiny.
```

The `dev/02_dev.R` script contains a few helper functions to get you started.

### Updating the `renv` lockfile

Make sure to regularly run `renv::status(dev = TRUE)` to check if your local library and the lockfile
are up to date.

When adding a new dependency, install it in the `renv` library with

```r
renv::install("package_name")
```

and then use it in your code as usual.
`renv` will pick up the new package if it's installed and used in the project.

To update the lockfile, run

```r
renv::snapshot(dev = TRUE)
```

The `dev = TRUE` argument ensures that development dependencies (e.g. those recorded under
`Suggests` in the `DESCRIPTION` file) are also included in the lockfile.

### Design

Expand Down
4 changes: 3 additions & 1 deletion renv/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"bioconductor.version": null,
"external.libraries": [],
"ignored.packages": [],
"ignored.packages": [
"calypso"
],
"package.dependency.fields": [
"Imports",
"Depends",
Expand Down

0 comments on commit d1415c2

Please sign in to comment.