diff --git a/src/r-ver/README.md b/src/r-ver/README.md index dfb8ebd..6cf38db 100644 --- a/src/r-ver/README.md +++ b/src/r-ver/README.md @@ -63,9 +63,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) @@ -81,6 +95,21 @@ 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": {} + } +} +``` + --- diff --git a/src/r2u/README.md b/src/r2u/README.md index 78240fa..c5eea32 100644 --- a/src/r2u/README.md +++ b/src/r2u/README.md @@ -23,6 +23,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 @@ -43,6 +62,26 @@ Only add `"installJupyterlab": true` to `devcontainer.json` like below. } ``` +## 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 +} +``` + ---