1 | # Wedge definition for R libraries
|
2 | #
|
3 | # Loaded by deps/wedge.sh.
|
4 |
|
5 | set -o nounset
|
6 | set -o pipefail
|
7 | set -o errexit
|
8 |
|
9 | # sourced
|
10 | WEDGE_NAME='R-libs'
|
11 | WEDGE_VERSION='2023-04-18'
|
12 |
|
13 | # We are installing into /home/wedge-makeer, and we want to use it from
|
14 | # /home/andy or /home/uke
|
15 | #
|
16 | # WEDGE_IS_ABSOLUTE=1
|
17 |
|
18 | # R hits the network
|
19 | WEDGE_LEAKY_BUILD=1
|
20 |
|
21 | # Notes: dplyr 1.0.3 as of January 2021 made these fail on Xenial.
|
22 | # I did an R 4.0 installation. See build/py.sh install-new-R
|
23 | #
|
24 | # February 2023: compile errors with dplyr and Ubuntu 18.04, which has R 3.4.4.
|
25 | # tidyverse has minimum R of 3.6.
|
26 | # I need to install a new R again.
|
27 |
|
28 | wedge-make() {
|
29 | echo 'No make step'
|
30 |
|
31 | }
|
32 |
|
33 | wedge-install() {
|
34 | local build_dir=$1
|
35 | local install_dir=$2
|
36 |
|
37 | # 2024-02 - weird fix, I had to add "rlang" on Debian Bookworm. Otherwise
|
38 | # the smoke test for dplyr/tidyr would fail.
|
39 |
|
40 | # Also consider adding ggplot.
|
41 | INSTALL_DEST=$install_dir Rscript -e \
|
42 | 'install.packages(c("rlang", "dplyr", "tidyr", "stringr", "RUnit"), lib=Sys.getenv("INSTALL_DEST"), repos="https://cloud.r-project.org")'
|
43 | }
|
44 |
|
45 | wedge-smoke-test() {
|
46 | local install_dir=$1
|
47 |
|
48 | R_LIBS_USER=$install_dir Rscript -e \
|
49 | 'library(rlang); library(dplyr); library(tidyr); library(stringr); library("RUnit"); print("OK")'
|
50 | }
|