Skip to content

Commit

Permalink
[r-ver][r2u] add notes about rstudio-server and r-history (#25)
Browse files Browse the repository at this point in the history
Close #23
  • Loading branch information
eitsupi authored Sep 14, 2023
1 parent 4ca43f5 commit 58b07bb
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 1 deletion.
31 changes: 30 additions & 1 deletion src/r-ver/NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,23 @@ by setting `postCreateCommand` as follows.

The package cache is shared by all containers on the same machine, so later builds can be faster.

## Use [RStudio Server](https://posit.co/products/open-source/rstudio-server/)

[The `ghcr.io/rocker-org/devcontainer-features/rstudio-server` Feature](https://github.com/rocker-org/devcontainer-features/tree/main/src/rstudio-server)
can be used to install and configure RStudio Server.

```json
{
"image": "ghcr.io/rocker-org/devcontainer/r-ver:4",
"features": {
"ghcr.io/rocker-org/devcontainer-features/rstudio-server:latest": {}
}
}
```

## Use [Jupyter](https://jupyter.org/)

[The `ghcr.io/rocker-org/devcontainer-features/r-rig` feature](https://github.com/rocker-org/devcontainer-features/tree/main/src/r-rig)
[The `ghcr.io/rocker-org/devcontainer-features/r-rig` Feature](https://github.com/rocker-org/devcontainer-features/tree/main/src/r-rig)
can be used to install `jupyterlab` and `IRkernel`.
(Remember to set `"version": "none"` for not to install another R)

Expand All @@ -68,3 +82,18 @@ can be used to install `jupyterlab` and `IRkernel`.
}
}
```

## Make R console history persistent

Normally the R console history is lost when we recreate the container,
but we can preserve the history with
[The `ghcr.io/rocker-org/devcontainer-features/r-history` Feature](https://github.com/rocker-org/devcontainer-features/tree/main/src/r-history).

```json
{
"image": "ghcr.io/rocker-org/devcontainer/r-ver:4",
"features": {
"ghcr.io/rocker-org/devcontainer-features/r-history:0": {}
}
}
```
39 changes: 39 additions & 0 deletions src/r2u/NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,25 @@ This template pulls the `linux/amd64` platform image because
Since `bspm` is enabled, the binary R packages (from `r2u` repository) and system dependencies can be installed
via the `install.package` R function.

## Use [RStudio Server](https://posit.co/products/open-source/rstudio-server/)

[The `ghcr.io/rocker-org/devcontainer-features/rstudio-server` Feature](https://github.com/rocker-org/devcontainer-features/tree/main/src/rstudio-server)
can be used to install and configure RStudio Server.

```jsonc
"features": {
"ghcr.io/rocker-org/devcontainer-features/r-apt:0": {
"vscodeRSupport": "full",
"installDevTools": true,
"installRMarkdown": true,
"installRadian": true,
"installVscDebugger": true,
"installBspm": true,
},
"ghcr.io/rocker-org/devcontainer-features/rstudio-server:latest": {} // This line
}
```

## Use [Jupyter](https://jupyter.org/)

The `InstallJupyterlab` option of
Expand All @@ -31,3 +50,23 @@ Only add `"installJupyterlab": true` to `devcontainer.json` like below.
"installJupyterlab": true // This line
}
```

## Make R console history persistent

Normally the R console history is lost when we recreate the container,
but we can preserve the history with
[The `ghcr.io/rocker-org/devcontainer-features/r-history` Feature](https://github.com/rocker-org/devcontainer-features/tree/main/src/r-history).

```jsonc
"features": {
"ghcr.io/rocker-org/devcontainer-features/r-apt:0": {
"vscodeRSupport": "full",
"installDevTools": true,
"installRMarkdown": true,
"installRadian": true,
"installVscDebugger": true,
"installBspm": true,
},
"ghcr.io/rocker-org/devcontainer-features/r-history:0": {} // This line
}
```

0 comments on commit 58b07bb

Please sign in to comment.