Skip to content

Commit 9af4f67

Browse files
committed
Fix examples for pingr and Rcpp
1 parent 8c6d8ec commit 9af4f67

File tree

12 files changed

+80
-52
lines changed

12 files changed

+80
-52
lines changed

README.Rmd

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,22 @@ See also the discussion at https://github.com/r-hub/r-minimal/issues/24
251251
installr -d -a "imagemagick imagemagick-dev" -t "curl-dev" magick
252252
```
253253

254+
* pingr 2.0.4 does not build on Alpine, use the dev version:
255+
256+
```
257+
installr -d -t linux-headers r-lib/pingr
258+
```
259+
260+
* Rcpp 1.0.13 [does not compile with R 4.4.2](
261+
https://github.com/RcppCore/Rcpp/issues/1341). Use the dev version of
262+
Rcpp until a new version is released on CRAN. This affects all packages
263+
that depend on Rcpp, naturally. E.g. shiny, V8, rstan, odbc, golem,
264+
prophet, pagedown, plumber, sf, etc. See the updated [examples].
265+
266+
```
267+
installr -d Rcppcore/Rcpp
268+
```
269+
254270
## License
255271

256272
See <https://www.r-project.org/Licenses/> for the R licenses

README.md

Lines changed: 54 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ CRAN or GitHub:
2323

2424
❯ installr -h
2525
Usage: ./installr [ -c | -d ] [ -e ] [ -a pkgs ] [ -t pkgs ] [ -r ] [ -p ] REMOTES ...
26-
26+
2727
Options:
2828
-c install C and C++ compilers and keep them
2929
-d install C and C++ compilers, temporarily
3030
-a install Alpine packages and keep them
3131
-t install Alpine packages, temporarily
3232
-p do not remove pak after the installation (ignored if -r is given).
3333
-e use renv to restore the renv.lock file if present.
34-
34+
3535
REMOTES may be:
3636
* package names from CRAN/Bioconductor, e.g. ggplot2
3737
* slugs of GitHub repos, e.g. tidyverse/ggplot2
@@ -50,18 +50,18 @@ To keep the images minimal, they do not include a number of parts and
5050
features that most users would prefer to have for interactive R
5151
development:
5252

53-
- Recommended R packages are not installed.
54-
- Documentation is not included.
55-
- No X11 support.
56-
- No OpenMP support. (But you can configure it for a package, see
57-
[examples/data.table](examples/data.table).)
58-
- No JPEG, PNG or TIFF support.
59-
- No Cairo support.
60-
- No Tcl/Tk support.
61-
- No translations, only English.
62-
- The image does not have C, C++ or Fortran compilers.
63-
- Limited time zone data: `GMT`, `UTC` and `America/New_York`, see
64-
below if you need better time zone data.
53+
- Recommended R packages are not installed.
54+
- Documentation is not included.
55+
- No X11 support.
56+
- No OpenMP support. (But you can configure it for a package, see
57+
[examples/data.table](examples/data.table).)
58+
- No JPEG, PNG or TIFF support.
59+
- No Cairo support.
60+
- No Tcl/Tk support.
61+
- No translations, only English.
62+
- The image does not have C, C++ or Fortran compilers.
63+
- Limited time zone data: `GMT`, `UTC` and `America/New_York`, see below
64+
if you need better time zone data.
6565

6666
## Usage
6767

@@ -85,7 +85,7 @@ Currently we support the last patch version of the last five minor R
8585
versions. The `latest` tag always uses the last R release.
8686

8787
| image | R version | tags | note |
88-
| --------- | ------------- | ----------------------------------------------------------------- | ----------- |
88+
|-----------|---------------|-------------------------------------------------------------------|-------------|
8989
| R devel | 4.5.0-devel | `devel`, `4.5.0`, `4.5`, `4.5.0-devel`, `4.5-devel`, `2024-11-02` | Built daily |
9090
| R next | 4.4.2-Patched | `next`, `patched`, `4.4.2-patched`, `4.4-patched` | Built daily |
9191
| R release | 4.4.2 | `4.4.2`, `4.4`, `release`, `latest` | |
@@ -140,8 +140,8 @@ CMD [ "R", "-q", "-e", "pingr::is_online() || stop('offline')" ]
140140
```
141141

142142
Similarly to compilers, system packages are removed after the R packages
143-
have been installed. If you want to keep (some of) them, use `installr
144-
-a` instead of `installr -t`. (You can also mix the two.)
143+
have been installed. If you want to keep (some of) them, use
144+
`installr -a` instead of `installr -t`. (You can also mix the two.)
145145

146146
Using with renv:
147147

@@ -167,8 +167,8 @@ shiny and rmarkdown in a container.
167167

168168
Hints on installing some popular R packages:
169169

170-
| package | installr command | \~ image size (uncompressed) |
171-
| ---------- | ------------------------------------------------------------------ | -------------------------------- |
170+
| package | installr command | ~ image size (uncompressed) |
171+
|------------|--------------------------------------------------------------------|----------------------------------|
172172
| data.table | See [examples/data.table](examples/data.table) for OpenMP support | 26.2 MB (50.0 MB) |
173173
| dplyr | `installr -d dplyr` | 31.9 MB (59.7 MB) |
174174
| ggplot2 | `installr -d -t gfortran ggplot2` | 56.1 MB (93.5 MB) |
@@ -206,29 +206,41 @@ See also the discussion at
206206

207207
## Known failures and workarounds
208208

209-
- The ps package needs the `linux-headers` Alpine package at compile
210-
time. Many tidyverse packages depend on ps, so they’ll need it as
211-
well:
212-
213-
installr -d -t linux-headers ps
214-
215-
- The arrow package needs a `Makevars` file to add a link flag. See
216-
the example `Dockerfile` in the [examples/arrow](examples/arrow)
217-
directory.
218-
219-
- The V8 packagees do not compile on aarch64 machines by default. On
220-
x86\_64 it installs fine:
221-
222-
installr -d -t curl-dev V8
223-
224-
This means that other packages that need V8 (e.g. rstan and prophet)
225-
do not work on aarch64, either.
226-
227-
- To install the magick package, you need both the `imagemagick` and
228-
`imagemagick-dev` Alpine packages, both at install time and run
229-
time:
230-
231-
installr -d -a "imagemagick imagemagick-dev" -t "curl-dev" magick
209+
- The ps package needs the `linux-headers` Alpine package at compile
210+
time. Many tidyverse packages depend on ps, so they’ll need it as
211+
well:
212+
213+
installr -d -t linux-headers ps
214+
215+
- The arrow package needs a `Makevars` file to add a link flag. See the
216+
example `Dockerfile` in the [examples/arrow](examples/arrow)
217+
directory.
218+
219+
- The V8 packagees do not compile on aarch64 machines by default. On
220+
x86_64 it installs fine:
221+
222+
installr -d -t curl-dev V8
223+
224+
This means that other packages that need V8 (e.g. rstan and prophet)
225+
do not work on aarch64, either.
226+
227+
- To install the magick package, you need both the `imagemagick` and
228+
`imagemagick-dev` Alpine packages, both at install time and run time:
229+
230+
installr -d -a "imagemagick imagemagick-dev" -t "curl-dev" magick
231+
232+
- pingr 2.0.4 does not build on Alpine, use the dev version:
233+
234+
installr -d -t linux-headers r-lib/pingr
235+
236+
- Rcpp 1.0.13 [does not compile with R
237+
4.4.2](https://github.com/RcppCore/Rcpp/issues/1341). Use the dev
238+
version of Rcpp until a new version is released on CRAN. This affects
239+
all packages that depend on Rcpp, naturally. E.g. shiny, V8, rstan,
240+
odbc, golem, prophet, pagedown, plumber, sf, etc. See the updated
241+
\[examples\].
242+
243+
installr -d Rcppcore/Rcpp
232244

233245
## License
234246

examples/V8/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ FROM rhub/r-minimal
33

44
ENV DOWNLOAD_STATIC_LIBV8=1
55

6-
RUN installr -d -t curl-dev V8
6+
RUN installr -d -t curl-dev V8 Rcppcore/Rcpp

examples/golem/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ RUN apk add --no-cache --update-cache \
1717
# installation of `golem`
1818
RUN installr -d \
1919
-t "curl-dev openssl-dev libxml2-dev gfortran libgit2-dev" \
20-
-a "libgit2" golem
20+
-a "libgit2" golem Rcppcore/Rcpp

examples/odbc/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11

22
FROM rhub/r-minimal
33

4-
RUN installr -d -t unixodbc-dev -a unixodbc odbc
4+
RUN installr -d -t unixodbc-dev -a unixodbc odbc Rcppcore/Rcpp

examples/pagedown/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ RUN apk add --no-cache --update-cache \
1010
installr -d \
1111
-t "openssl-dev linux-headers autoconf automake zlib-dev" \
1212
-a "openssl chromium chromium-chromedriver" \
13-
pagedown
13+
pagedown Rcppcore/Rcpp
1414

1515
RUN wget https://github.com/jgm/pandoc/releases/download/2.13/pandoc-2.13-linux-amd64.tar.gz && \
1616
tar xzf pandoc-2.13-linux-amd64.tar.gz && \

examples/pingr/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
FROM rhub/r-minimal
33

4-
RUN installr -d -t linux-headers pingr
4+
RUN installr -d -t linux-headers r-lib/pingr
55

66
CMD [ "R", "-q", "-e", "pingr::is_online() || stop('offline')" ]

examples/plumber/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM rhub/r-minimal
33
RUN installr -d \
44
-t "libsodium-dev curl-dev linux-headers" \
55
-a libsodium \
6-
plumber
6+
plumber Rcppcore/Rcpp
77

88
WORKDIR /app
99

examples/prophet/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ FROM rhub/r-minimal
33

44
ENV DOWNLOAD_STATIC_LIBV8=1
55

6-
RUN installr -d -t "linux-headers gfortran curl-dev" prophet
6+
RUN installr -d -t "linux-headers gfortran curl-dev" prophet Rcppcore/Rcpp

examples/rstan/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ FROM rhub/r-minimal
33

44
ENV DOWNLOAD_STATIC_LIBV8=1
55

6-
RUN installr -d -t "curl-dev linux-headers gfortran" rstan
6+
RUN installr -d -t "curl-dev linux-headers gfortran" rstan Rcppcore/Rcpp

0 commit comments

Comments
 (0)