diff --git a/src/apt-packages/NOTES.md b/src/apt-packages/NOTES.md index c45a00a..441e483 100644 --- a/src/apt-packages/NOTES.md +++ b/src/apt-packages/NOTES.md @@ -31,4 +31,4 @@ The following example installs the `r-cran-curl` package after the `r-apt` Featu "overrideFeatureInstallOrder": [ "ghcr.io/rocker-org/devcontainer-features/r-apt" ] -``` +``` \ No newline at end of file diff --git a/src/r-apt/NOTES.md b/src/r-apt/NOTES.md index 190cb25..d9d8024 100644 --- a/src/r-apt/NOTES.md +++ b/src/r-apt/NOTES.md @@ -29,7 +29,7 @@ apt-get -y install --no-install-recommends r-cran-dplyr Thanks to [r2u](https://eddelbuettel.github.io/r2u/), on Ubuntu, all packages on CRAN and BioConductor can be installed via apt. -If you want to install R packages via apt during the container build phase, +If you want to install R packages via apt during the container build phase (as opposed to installing R packages using the [`r-packages` Feature](https://github.com/rocker-org/devcontainer-features/tree/main/src/r-packages)), you can use [the `ghcr.io/rocker-org/devcontainer-features/apt-packages` Feature](https://github.com/rocker-org/devcontainer-features/blob/main/src/apt-packages) to do so. @@ -48,6 +48,20 @@ to do so. `ghcr.io/rocker-org/devcontainer-features/apt-packages` is not guaranteed to install after this Feature, so be sure to set up [the `overrideFeatureInstallOrder` property](https://containers.dev/implementors/features/#overrideFeatureInstallOrder). +When installing R packages via `r-cran-` using the `apt-packages` Feature, R package name references must be lowercase. For example, the following snippet installs the {kableExtra} R package. + +```json +"features": { + "ghcr.io/rocker-org/devcontainer-features/r-apt:latest": {}, + "ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { + "packages": "r-cran-kableextra" + } +}, +"overrideFeatureInstallOrder": [ + "ghcr.io/rocker-org/devcontainer-features/r-apt" +] +``` + ### Source installation via R Packages that cannot be installed via apt must be installed using the R functions.