From e6fb7fad1a05e5b7b1ef3046327609926e7ee7bc Mon Sep 17 00:00:00 2001 From: Malte Londschien Date: Mon, 4 Mar 2024 14:30:41 +0100 Subject: [PATCH 01/54] Test ci. From 9d725e5955796f00a8764d470ee314f50b2fba57 Mon Sep 17 00:00:00 2001 From: Malte Londschien Date: Mon, 4 Mar 2024 16:42:59 +0100 Subject: [PATCH 02/54] Add qpdf. --- .github/workflows/check.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index a3ea0c3d..4b6c9b87 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -50,6 +50,7 @@ jobs: eth-mds/mimic-demo eth-mds/eicu-demo nbenn/mockthat + any::qpdf - uses: r-lib/actions/check-r-package@v2 env: From d541952f5cda999383dd2a136ebfa55401017cdc Mon Sep 17 00:00:00 2001 From: Malte Londschien Date: Mon, 4 Mar 2024 16:49:46 +0100 Subject: [PATCH 03/54] Try message=False --- vignettes/ricu.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vignettes/ricu.Rmd b/vignettes/ricu.Rmd index 63e74a9b..721aaaf3 100644 --- a/vignettes/ricu.Rmd +++ b/vignettes/ricu.Rmd @@ -653,7 +653,7 @@ subset(mimic_demo$admissions, subject_id > 44000, language:ethnicity) This syntax makes it possible to read row-subsets of *long* tables into memory with little memory overhead. While terseness of such an API does introduce potential ambiguity, this is mostly overcome by using the tidy eval framework provided by \pkg{rlang} \citep{wickham2020}: -```{r mimic-tidy, eval = srcs_avail("mimic_demo")} +```{r mimic-tidy, eval = srcs_avail("mimic_demo"), message = FALSE} subject_id <- 44000:45000 subset(mimic_demo$admissions, .data$subject_id %in% .env$subject_id, subject_id:dischtime) From c328c82b77f2e260e675183d7626d1ea8aedd476 Mon Sep 17 00:00:00 2001 From: Malte Londschien Date: Mon, 4 Mar 2024 16:54:17 +0100 Subject: [PATCH 04/54] Set env variables above. --- .github/workflows/check.yaml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 4b6c9b87..84a9dcd8 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -28,6 +28,9 @@ jobs: R_REMOTES_NO_ERRORS_FROM_WARNINGS: true GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} R_KEEP_PKG_SOURCE: yes + _R_CHECK_CRAN_INCOMING_: false + _R_CHECK_FORCE_SUGGESTS_: false + _R_CHECK_DOC_SIZES_: false steps: - uses: actions/checkout@v2 @@ -50,12 +53,7 @@ jobs: eth-mds/mimic-demo eth-mds/eicu-demo nbenn/mockthat - any::qpdf - uses: r-lib/actions/check-r-package@v2 - env: - _R_CHECK_CRAN_INCOMING_: false - _R_CHECK_FORCE_SUGGESTS_: false - _R_CHECK_DOC_SIZES_: false with: upload-snapshots: true From 8c38355a4b544d2a35a5e1c4d361c91e7c227955 Mon Sep 17 00:00:00 2001 From: Malte Londschien Date: Mon, 4 Mar 2024 17:01:21 +0100 Subject: [PATCH 05/54] global message=F, warning=F --- vignettes/ricu.Rmd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vignettes/ricu.Rmd b/vignettes/ricu.Rmd index 721aaaf3..06ce22e8 100644 --- a/vignettes/ricu.Rmd +++ b/vignettes/ricu.Rmd @@ -73,7 +73,9 @@ pkgdown: options( width = 76, kableExtra.latex.load_packages = FALSE, - crayon.enabled = FALSE + crayon.enabled = FALSE, + message = FALSE, + warning = FALSE ) library(ricu) From 42770c75884a32087b46b7600c54c11af8718ab8 Mon Sep 17 00:00:00 2001 From: Malte Londschien Date: Mon, 4 Mar 2024 17:11:10 +0100 Subject: [PATCH 06/54] Try conda --- .github/workflows/check.yaml | 74 +++++++++++++++--------------------- 1 file changed, 31 insertions(+), 43 deletions(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 84a9dcd8..d5f745d9 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -6,54 +6,42 @@ on: branches: - main -name: check - jobs: - check: - runs-on: ${{ matrix.config.os }} - - name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + R-CMD-check: + name: R CMD check (${{ matrix.os }}) + runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - config: - - {os: macOS-latest, r: 'release'} - - {os: windows-latest, r: 'release'} - - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} - - {os: ubuntu-latest, r: 'release'} - - {os: ubuntu-latest, r: 'oldrel-1'} - - env: - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - R_KEEP_PKG_SOURCE: yes - _R_CHECK_CRAN_INCOMING_: false - _R_CHECK_FORCE_SUGGESTS_: false - _R_CHECK_DOC_SIZES_: false + os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] steps: - - uses: actions/checkout@v2 - - - uses: r-lib/actions/setup-tinytex@v2 - - run: tlmgr --version - - - uses: r-lib/actions/setup-pandoc@v2 - - - uses: r-lib/actions/setup-r@v2 - with: - r-version: ${{ matrix.config.r }} - http-user-agent: ${{ matrix.config.http-user-agent }} - use-public-rspm: true - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: | - any::rcmdcheck - eth-mds/mimic-demo - eth-mds/eicu-demo - nbenn/mockthat - - - uses: r-lib/actions/check-r-package@v2 + - uses: actions/checkout@v4 + - name: Set up Conda env + uses: mamba-org/provision-with-micromamba@e2b397b12d0a38069451664382b769c9456e3d6d with: - upload-snapshots: true + cache-env: true + - name: Run R CMD check + run: | + R CMD check --as-cran --no-vignettes --no-manual . + env: + _R_CHECK_CRAN_INCOMING_: false + - name: Check for warnings + run: | + CHECK_LOG_FILE=ricu.Rcheck/00check.log + CHECK_INSTALL_FILE=ricu.Rcheck/00install.out + if ! [[ -f "$CHECK_LOG_FILE" ]]; then + echo "Log-file not found." + exit 1 + fi + if cat $CHECK_LOG_FILE | grep -q "ERROR"; then + cat $CHECK_INSTALL_FILE + cat $CHECK_LOG_FILE + exit 1 + fi + if cat $CHECK_LOG_FILE | grep -q "WARNING"; then + echo "Found warnings, treated as errors." + cat $CHECK_LOG_FILE + exit 1 + fi \ No newline at end of file From 5d9dce9412fa0fb7e6e518d1269a9ce6e6012d73 Mon Sep 17 00:00:00 2001 From: Malte Londschien Date: Mon, 4 Mar 2024 17:12:40 +0100 Subject: [PATCH 07/54] add environment.yml. --- environment.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 environment.yml diff --git a/environment.yml b/environment.yml new file mode 100644 index 00000000..bf5715bb --- /dev/null +++ b/environment.yml @@ -0,0 +1,20 @@ +name: ricu +channels: + - nodefaults + - conda-forge +dependencies: + - r-base + - r-data.table + - r-curl + - r-assertthat + - r-fst + - r-readr + - r-jsonlite + - r-prt>=0.1.2 + - r-tibble + - r-backports + - r-rlang + - r-vctrs + - r-cli>=2.1.0 + - r-fansi + - r-openssl \ No newline at end of file From a281e45f0922f1a639a5461ebffce3ae1a013187 Mon Sep 17 00:00:00 2001 From: Malte Londschien Date: Tue, 5 Mar 2024 10:33:29 +0100 Subject: [PATCH 08/54] Add some dependencies. --- .github/workflows/check.yaml | 2 +- environment.yml | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index d5f745d9..57eb032c 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -24,7 +24,7 @@ jobs: cache-env: true - name: Run R CMD check run: | - R CMD check --as-cran --no-vignettes --no-manual . + R CMD build . && R CMD check --as-cran $(ls -t . | head -n1) env: _R_CHECK_CRAN_INCOMING_: false - name: Check for warnings diff --git a/environment.yml b/environment.yml index bf5715bb..86b39d27 100644 --- a/environment.yml +++ b/environment.yml @@ -17,4 +17,13 @@ dependencies: - r-vctrs - r-cli>=2.1.0 - r-fansi - - r-openssl \ No newline at end of file + - r-openssl + # optional + - r-rticles + - r-forestmodel + - r-ggplot2 + - r-survival + - r-kableExtra + - r-magick + - r-cowplot + - r-pdftools \ No newline at end of file From d1399f8a17dc46f6a323f5ec73dd11beba903fc2 Mon Sep 17 00:00:00 2001 From: Malte Londschien Date: Tue, 5 Mar 2024 10:39:01 +0100 Subject: [PATCH 09/54] Add r-knitr to env.yaml. --- environment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/environment.yml b/environment.yml index 86b39d27..cce66e0d 100644 --- a/environment.yml +++ b/environment.yml @@ -26,4 +26,5 @@ dependencies: - r-kableExtra - r-magick - r-cowplot + - r-knitr - r-pdftools \ No newline at end of file From 4e87c7007c115b103ca3f53bc6cfd790cc459a04 Mon Sep 17 00:00:00 2001 From: Malte Londschien Date: Tue, 5 Mar 2024 11:18:44 +0100 Subject: [PATCH 10/54] install knitr manually. --- .github/workflows/check.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 57eb032c..b294f843 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -22,6 +22,9 @@ jobs: uses: mamba-org/provision-with-micromamba@e2b397b12d0a38069451664382b769c9456e3d6d with: cache-env: true + - name: Install knitr manually + run: | + Rscript -e 'install.packages("knitr", repos = "http://cran.us.r-project.org")' - name: Run R CMD check run: | R CMD build . && R CMD check --as-cran $(ls -t . | head -n1) From 7c5045e870cde0cf22eca2dc5d6da5d3f504c1d4 Mon Sep 17 00:00:00 2001 From: Malte Londschien Date: Wed, 6 Mar 2024 10:54:24 +0100 Subject: [PATCH 11/54] Add r-covr and r-units to env.yaml. --- environment.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index cce66e0d..370ffb0a 100644 --- a/environment.yml +++ b/environment.yml @@ -27,4 +27,6 @@ dependencies: - r-magick - r-cowplot - r-knitr - - r-pdftools \ No newline at end of file + - r-pdftools + - r-covr + - r-units \ No newline at end of file From 95b6b3542cd95a091fc16ec306faaceb5ea5b744 Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Tue, 26 Mar 2024 21:44:56 +0100 Subject: [PATCH 12/54] Test R location --- .github/workflows/check.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index b294f843..f3282a80 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -22,6 +22,9 @@ jobs: uses: mamba-org/provision-with-micromamba@e2b397b12d0a38069451664382b769c9456e3d6d with: cache-env: true + - name: + run: | + which R - name: Install knitr manually run: | Rscript -e 'install.packages("knitr", repos = "http://cran.us.r-project.org")' From 4c24a84c2c0b7904435f883ae3c2d82ffc0a5b24 Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Tue, 26 Mar 2024 21:48:59 +0100 Subject: [PATCH 13/54] execute command in shell --- .github/workflows/check.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index f3282a80..003db90b 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -23,6 +23,7 @@ jobs: with: cache-env: true - name: + shell: bash -l {0} run: | which R - name: Install knitr manually From 01dfe591b551d7cb5d49aff6088b7562c30dc577 Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Tue, 26 Mar 2024 21:51:16 +0100 Subject: [PATCH 14/54] Execute steps in shell --- .github/workflows/check.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 003db90b..789d10e3 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -27,14 +27,17 @@ jobs: run: | which R - name: Install knitr manually + shell: bash -l {0} run: | Rscript -e 'install.packages("knitr", repos = "http://cran.us.r-project.org")' - name: Run R CMD check + shell: bash -l {0} run: | R CMD build . && R CMD check --as-cran $(ls -t . | head -n1) env: _R_CHECK_CRAN_INCOMING_: false - name: Check for warnings + shell: bash -l {0} run: | CHECK_LOG_FILE=ricu.Rcheck/00check.log CHECK_INSTALL_FILE=ricu.Rcheck/00install.out From 2d4a87bc559e8ade71ef7f8dfb40200f16fe1c27 Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Tue, 26 Mar 2024 21:54:54 +0100 Subject: [PATCH 15/54] Add pdflatex to environment --- environment.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 370ffb0a..897dbc15 100644 --- a/environment.yml +++ b/environment.yml @@ -29,4 +29,5 @@ dependencies: - r-knitr - r-pdftools - r-covr - - r-units \ No newline at end of file + - r-units + - pdflatex \ No newline at end of file From 8c9b138817f4f7508a9e91f011d9ba63e9d91ff7 Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Tue, 26 Mar 2024 22:07:16 +0100 Subject: [PATCH 16/54] check pdflatex --- .github/workflows/check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 789d10e3..49e8c2e6 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -25,7 +25,7 @@ jobs: - name: shell: bash -l {0} run: | - which R + which pdflatex - name: Install knitr manually shell: bash -l {0} run: | From 82cbc06efa33cb18ab8f3d6e9ed4a864a504158e Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Tue, 26 Mar 2024 22:19:40 +0100 Subject: [PATCH 17/54] add texlive env --- .github/workflows/check.yaml | 3 +++ environment.yml | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 49e8c2e6..0e0228a1 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -31,6 +31,9 @@ jobs: run: | Rscript -e 'install.packages("knitr", repos = "http://cran.us.r-project.org")' - name: Run R CMD check + uses: xu-cheng/texlive-action@v2 + with: + scheme: small shell: bash -l {0} run: | R CMD build . && R CMD check --as-cran $(ls -t . | head -n1) diff --git a/environment.yml b/environment.yml index 897dbc15..370ffb0a 100644 --- a/environment.yml +++ b/environment.yml @@ -29,5 +29,4 @@ dependencies: - r-knitr - r-pdftools - r-covr - - r-units - - pdflatex \ No newline at end of file + - r-units \ No newline at end of file From c27852187e87215110eaaa205f4f7a090c8aa4d8 Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Tue, 26 Mar 2024 22:21:59 +0100 Subject: [PATCH 18/54] move --- .github/workflows/check.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 0e0228a1..da328700 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -34,9 +34,9 @@ jobs: uses: xu-cheng/texlive-action@v2 with: scheme: small - shell: bash -l {0} - run: | - R CMD build . && R CMD check --as-cran $(ls -t . | head -n1) + shell: bash -l {0} + run: | + R CMD build . && R CMD check --as-cran $(ls -t . | head -n1) env: _R_CHECK_CRAN_INCOMING_: false - name: Check for warnings From f03342845eb466b89c637e22058b73d1575f4368 Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Tue, 26 Mar 2024 22:24:15 +0100 Subject: [PATCH 19/54] don't check for pdflatex --- .github/workflows/check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index da328700..252bac64 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -25,7 +25,7 @@ jobs: - name: shell: bash -l {0} run: | - which pdflatex + which R - name: Install knitr manually shell: bash -l {0} run: | From 2adecfca7abcee02e7a86d379cad5b140e560db5 Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Tue, 26 Mar 2024 22:30:27 +0100 Subject: [PATCH 20/54] Add texlive to env --- .github/workflows/check.yaml | 4 ++-- environment.yml | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 252bac64..5072874b 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] + os: ['ubuntu-latest', 'macos-latest'] # , 'windows-latest'] steps: - uses: actions/checkout@v4 @@ -25,7 +25,7 @@ jobs: - name: shell: bash -l {0} run: | - which R + which pdflatex - name: Install knitr manually shell: bash -l {0} run: | diff --git a/environment.yml b/environment.yml index 370ffb0a..de6217ad 100644 --- a/environment.yml +++ b/environment.yml @@ -29,4 +29,5 @@ dependencies: - r-knitr - r-pdftools - r-covr - - r-units \ No newline at end of file + - r-units + - texlive-core # for CI \ No newline at end of file From 18f54ffebef067093e9957d8057c16bbc246728a Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Tue, 26 Mar 2024 22:32:05 +0100 Subject: [PATCH 21/54] Remove texlive action --- .github/workflows/check.yaml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 5072874b..c8f52b98 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -31,12 +31,9 @@ jobs: run: | Rscript -e 'install.packages("knitr", repos = "http://cran.us.r-project.org")' - name: Run R CMD check - uses: xu-cheng/texlive-action@v2 - with: - scheme: small - shell: bash -l {0} - run: | - R CMD build . && R CMD check --as-cran $(ls -t . | head -n1) + shell: bash -l {0} + run: | + R CMD build . && R CMD check --as-cran $(ls -t . | head -n1) env: _R_CHECK_CRAN_INCOMING_: false - name: Check for warnings From aefd07c5ee1e24bcbc04d1485c680420414ac8fc Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Tue, 26 Mar 2024 22:37:24 +0100 Subject: [PATCH 22/54] Update env --- environment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/environment.yml b/environment.yml index de6217ad..f53bb12b 100644 --- a/environment.yml +++ b/environment.yml @@ -30,4 +30,5 @@ dependencies: - r-pdftools - r-covr - r-units + - r-tinytex - texlive-core # for CI \ No newline at end of file From 32b6b1b9963582821f2a3121feed974319359011 Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Tue, 26 Mar 2024 22:39:12 +0100 Subject: [PATCH 23/54] Upd env --- environment.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/environment.yml b/environment.yml index f53bb12b..12d01f5b 100644 --- a/environment.yml +++ b/environment.yml @@ -30,5 +30,4 @@ dependencies: - r-pdftools - r-covr - r-units - - r-tinytex - - texlive-core # for CI \ No newline at end of file + - r-tinytex \ No newline at end of file From 85e81d1903c3376bbfa1a504c34fefbd94bd201d Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Tue, 26 Mar 2024 22:47:37 +0100 Subject: [PATCH 24/54] Add tinytex install --- .github/workflows/check.yaml | 4 ++++ environment.yml | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index c8f52b98..3c7bd98b 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -30,6 +30,10 @@ jobs: shell: bash -l {0} run: | Rscript -e 'install.packages("knitr", repos = "http://cran.us.r-project.org")' + - name: Install TinyTex + shell: bash -l {0} + run: | + Rscript -e 'tinytex::install_tinytex()' - name: Run R CMD check shell: bash -l {0} run: | diff --git a/environment.yml b/environment.yml index 12d01f5b..f53bb12b 100644 --- a/environment.yml +++ b/environment.yml @@ -30,4 +30,5 @@ dependencies: - r-pdftools - r-covr - r-units - - r-tinytex \ No newline at end of file + - r-tinytex + - texlive-core # for CI \ No newline at end of file From 1d408b128b07c5e0b56839313425822edce91bc8 Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Tue, 26 Mar 2024 22:49:46 +0100 Subject: [PATCH 25/54] force tiny tex --- .github/workflows/check.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 3c7bd98b..4a07eaf2 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -26,14 +26,10 @@ jobs: shell: bash -l {0} run: | which pdflatex - - name: Install knitr manually - shell: bash -l {0} - run: | - Rscript -e 'install.packages("knitr", repos = "http://cran.us.r-project.org")' - name: Install TinyTex shell: bash -l {0} run: | - Rscript -e 'tinytex::install_tinytex()' + Rscript -e 'tinytex::install_tinytex(force = TRUE)' - name: Run R CMD check shell: bash -l {0} run: | From c0f887acdc24c671471bb8b630bb748ab56f7fd7 Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Tue, 26 Mar 2024 22:58:12 +0100 Subject: [PATCH 26/54] Update env and install demos --- .github/workflows/check.yaml | 8 ++++---- environment.yml | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 4a07eaf2..dfdba9a8 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -22,14 +22,14 @@ jobs: uses: mamba-org/provision-with-micromamba@e2b397b12d0a38069451664382b769c9456e3d6d with: cache-env: true - - name: - shell: bash -l {0} - run: | - which pdflatex - name: Install TinyTex shell: bash -l {0} run: | Rscript -e 'tinytex::install_tinytex(force = TRUE)' + - name: Install demo datasets + shell: bash -l {0} + run: | + Rscript -e 'install.packages(c("mimic.demo", "eicu_demo"), repos="https://eth-mds.github.io/physionet-demo")' - name: Run R CMD check shell: bash -l {0} run: | diff --git a/environment.yml b/environment.yml index f53bb12b..15f1b4bf 100644 --- a/environment.yml +++ b/environment.yml @@ -31,4 +31,6 @@ dependencies: - r-covr - r-units - r-tinytex - - texlive-core # for CI \ No newline at end of file + - r-testthat + - r-mockthat + - r-pkgload \ No newline at end of file From a0c95f3c46d821dcab9abf10ffc889865f46e40e Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Tue, 26 Mar 2024 23:02:13 +0100 Subject: [PATCH 27/54] Fix typo --- .github/workflows/check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index dfdba9a8..c27a216a 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -29,7 +29,7 @@ jobs: - name: Install demo datasets shell: bash -l {0} run: | - Rscript -e 'install.packages(c("mimic.demo", "eicu_demo"), repos="https://eth-mds.github.io/physionet-demo")' + Rscript -e 'install.packages(c("mimic.demo", "eicu.demo"), repos="https://eth-mds.github.io/physionet-demo")' - name: Run R CMD check shell: bash -l {0} run: | From 4004d1ecb12fe1077fc6814b0081f87ab5126c26 Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Tue, 26 Mar 2024 23:04:58 +0100 Subject: [PATCH 28/54] No need to make docs --- .github/workflows/pkgdown.yaml | 96 +++++++++++++++++----------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index a80a385a..ac50c59e 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -1,48 +1,48 @@ -on: - push: - branches: - - main - pull_request: - branches: - - main - -name: pkgdown - -jobs: - pkgdown: - runs-on: ubuntu-latest - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - - steps: - - uses: actions/checkout@v2 - - - uses: r-lib/actions/setup-tinytex@v2 - - run: tlmgr --version - - - uses: r-lib/actions/setup-pandoc@v2 - - - uses: r-lib/actions/setup-r@v2 - with: - use-public-rspm: true - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: | - any::pkgdown - local::. - eth-mds/mimic-demo - eth-mds/eicu-demo - nbenn/mockthat - - - name: Build site - run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) - shell: Rscript {0} - - - name: Deploy to GitHub pages πŸš€ - if: github.event_name != 'pull_request' - uses: JamesIves/github-pages-deploy-action@4.1.4 - with: - clean: false - branch: gh-pages - folder: docs +# on: +# push: +# branches: +# - main +# pull_request: +# branches: +# - main + +# name: pkgdown + +# jobs: +# pkgdown: +# runs-on: ubuntu-latest +# env: +# GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + +# steps: +# - uses: actions/checkout@v2 + +# - uses: r-lib/actions/setup-tinytex@v2 +# - run: tlmgr --version + +# - uses: r-lib/actions/setup-pandoc@v2 + +# - uses: r-lib/actions/setup-r@v2 +# with: +# use-public-rspm: true + +# - uses: r-lib/actions/setup-r-dependencies@v2 +# with: +# extra-packages: | +# any::pkgdown +# local::. +# eth-mds/mimic-demo +# eth-mds/eicu-demo +# nbenn/mockthat + +# - name: Build site +# run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) +# shell: Rscript {0} + +# - name: Deploy to GitHub pages πŸš€ +# if: github.event_name != 'pull_request' +# uses: JamesIves/github-pages-deploy-action@4.1.4 +# with: +# clean: false +# branch: gh-pages +# folder: docs From 6a77866e4f5f1c66bce94fb608e276d5972d330f Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Tue, 26 Mar 2024 23:06:28 +0100 Subject: [PATCH 29/54] Add codetools to env --- environment.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 15f1b4bf..1e0cfd86 100644 --- a/environment.yml +++ b/environment.yml @@ -33,4 +33,5 @@ dependencies: - r-tinytex - r-testthat - r-mockthat - - r-pkgload \ No newline at end of file + - r-pkgload + - r-codetools \ No newline at end of file From 20a16740b934ced59cf5b12b9a35cbdee5023192 Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Tue, 26 Mar 2024 23:16:19 +0100 Subject: [PATCH 30/54] Suppress manual check --- .github/workflows/check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index c27a216a..f80262ee 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -33,7 +33,7 @@ jobs: - name: Run R CMD check shell: bash -l {0} run: | - R CMD build . && R CMD check --as-cran $(ls -t . | head -n1) + R CMD build . && R CMD check --as-cran $(ls -t . | head -n1) --no-manual env: _R_CHECK_CRAN_INCOMING_: false - name: Check for warnings From 8a39f7f749ab9edadb818481a288a089b2299ffa Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Tue, 26 Mar 2024 23:27:51 +0100 Subject: [PATCH 31/54] add qpdf --- environment.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 1e0cfd86..e9c036fc 100644 --- a/environment.yml +++ b/environment.yml @@ -34,4 +34,5 @@ dependencies: - r-testthat - r-mockthat - r-pkgload - - r-codetools \ No newline at end of file + - r-codetools + - qpdf \ No newline at end of file From 1068981b6953278034bf0c04f565671b646d54a8 Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Tue, 26 Mar 2024 23:31:38 +0100 Subject: [PATCH 32/54] Add picdb data-env doclines --- R/data-env.R | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/R/data-env.R b/R/data-env.R index 5f409e85..7e141ced 100644 --- a/R/data-env.R +++ b/R/data-env.R @@ -239,6 +239,10 @@ NULL #' @rdname data_env NULL +#' @name picdb +#' @rdname data_env +NULL + data_env <- function() get("data", envir = pkg_env(), mode = "environment") #' Data source environments From c9893b98b232c7fe85f09db66ff8524e7b336e22 Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Tue, 26 Mar 2024 23:37:10 +0100 Subject: [PATCH 33/54] Don't check doc size --- .github/workflows/check.yaml | 1 + environment.yml | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index f80262ee..15370d34 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -36,6 +36,7 @@ jobs: R CMD build . && R CMD check --as-cran $(ls -t . | head -n1) --no-manual env: _R_CHECK_CRAN_INCOMING_: false + _R_CHECK_DOC_SIZES_: false - name: Check for warnings shell: bash -l {0} run: | diff --git a/environment.yml b/environment.yml index e9c036fc..1e0cfd86 100644 --- a/environment.yml +++ b/environment.yml @@ -34,5 +34,4 @@ dependencies: - r-testthat - r-mockthat - r-pkgload - - r-codetools - - qpdf \ No newline at end of file + - r-codetools \ No newline at end of file From 59a1c26ba1e962cb5562bc417c4aec7c62050c59 Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Tue, 26 Mar 2024 23:41:58 +0100 Subject: [PATCH 34/54] run roxygen --- DESCRIPTION | 2 +- NAMESPACE | 7 ++++ man/change_id.Rd | 58 +++++++++++++++++----------- man/data_env.Rd | 98 ++++++++++++++++++++++++++++++++++------------- man/data_items.Rd | 3 ++ man/data_utils.Rd | 6 +++ man/file_utils.Rd | 3 +- man/label_sep3.Rd | 85 +++++++++++++++++++++++++++++++++++++++- man/load_src.Rd | 10 +++++ 9 files changed, 220 insertions(+), 52 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index c04c3c3e..0d1a966b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -70,7 +70,7 @@ Suggests: pdftools, magick, pillar -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.1 Additional_repositories: https://eth-mds.github.io/physionet-demo VignetteBuilder: knitr Config/testthat/edition: 3 diff --git a/NAMESPACE b/NAMESPACE index e189dc15..919b9727 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -92,12 +92,14 @@ S3method(do_callback,fun_itm) S3method(do_callback,hrd_itm) S3method(do_callback,itm) S3method(do_callback,rec_cncpt) +S3method(do_callback,sic_itm) S3method(do_itm_load,col_itm) S3method(do_itm_load,default) S3method(do_itm_load,fun_itm) S3method(do_itm_load,hrd_itm) S3method(do_itm_load,itm) S3method(do_itm_load,nul_itm) +S3method(do_itm_load,sic_itm) S3method(downgrade_id,default) S3method(downgrade_id,id_tbl) S3method(downgrade_id,ts_tbl) @@ -126,6 +128,7 @@ S3method(id_map_helper,default) S3method(id_map_helper,src_env) S3method(id_orig_helper,default) S3method(id_orig_helper,miiv_env) +S3method(id_orig_helper,sic_env) S3method(id_orig_helper,src_env) S3method(id_vars,col_cfg) S3method(id_vars,default) @@ -139,6 +142,7 @@ S3method(id_win_helper,eicu_env) S3method(id_win_helper,hirid_env) S3method(id_win_helper,miiv_env) S3method(id_win_helper,mimic_env) +S3method(id_win_helper,picdb_env) S3method(id_win_helper,sic_env) S3method(import_src,aumc_cfg) S3method(import_src,character) @@ -164,6 +168,7 @@ S3method(init_itm,hrd_itm) S3method(init_itm,itm) S3method(init_itm,rgx_itm) S3method(init_itm,sel_itm) +S3method(init_itm,sic_itm) S3method(interval,default) S3method(interval,difftime) S3method(interval,itm) @@ -188,6 +193,7 @@ S3method(load_difftime,eicu_tbl) S3method(load_difftime,hirid_tbl) S3method(load_difftime,miiv_tbl) S3method(load_difftime,mimic_tbl) +S3method(load_difftime,picdb_tbl) S3method(load_difftime,sic_tbl) S3method(load_id,character) S3method(load_id,default) @@ -232,6 +238,7 @@ S3method(prepare_query,default) S3method(prepare_query,hrd_itm) S3method(prepare_query,rgx_itm) S3method(prepare_query,sel_itm) +S3method(prepare_query,sic_itm) S3method(print,cncpt) S3method(print,id_tbl) S3method(print,itm) diff --git a/man/change_id.Rd b/man/change_id.Rd index 6193adf5..561869a9 100644 --- a/man/change_id.Rd +++ b/man/change_id.Rd @@ -57,19 +57,34 @@ and \code{downgrade_id()} when the target ID system is of lower cardinality } \details{ In order to provide ID system conversion for a data source, the (internal) -function [id_map()] must be able to construct an ID mapping for that data +function \code{\link[=id_map]{id_map()}} must be able to construct an ID mapping for that data source. Constructing such a mapping can be expensive w.r.t. the frequency -it might be re-used and therefore, [id_map()] provides caching +it might be re-used and therefore, \code{\link[=id_map]{id_map()}} provides caching infrastructure. The mapping itself is constructed by the (internal) -function [id_map_helper()], which is expected to provide source and +function \code{\link[=id_map_helper]{id_map_helper()}}, which is expected to provide source and destination ID columns as well as start and end columns corresponding to the destination ID, relative to the source ID system. In the following -example, we request for `mimic_demo`, with ICU stay IDs as source and +example, we request for \code{mimic_demo}, with ICU stay IDs as source and hospital admissions as destination IDs. -```{r, eval = is_data_avail("mimic_demo")} -id_map_helper(mimic_demo, "icustay_id", "hadm_id") -``` +\if{html}{\out{
}}\preformatted{id_map_helper(mimic_demo, "icustay_id", "hadm_id") +#> # An `id_tbl`: 136 x 4 +#> # Id var: `icustay_id` +#> icustay_id hadm_id hadm_id_start hadm_id_end +#> +#> 1 201006 198503 -3291 mins 9113 mins +#> 2 201204 114648 -2 mins 6949 mins +#> 3 203766 126949 -1336 mins 8818 mins +#> 4 204132 157609 -1 mins 10103 mins +#> 5 204201 177678 -369 mins 9444 mins +#> ... +#> 132 295043 170883 -10413 mins 31258 mins +#> 133 295741 176805 -2 mins 3152 mins +#> 134 296804 110244 -1295 mins 4598 mins +#> 135 297782 167612 -1 mins 207 mins +#> 136 298685 151323 -1 mins 19082 mins +#> # i 131 more rows +}\if{html}{\out{
}} Both start and end columns encode the hospital admission windows relative to each corresponding ICU stay start time. It therefore comes as no @@ -78,22 +93,21 @@ occurs before ICU stay start time), while end times are often days in the future (as hospital discharge typically occurs several days after ICU admission). -In order to use the ID conversion infrastructure offered by `ricu` for a -new dataset, it typically suffices to provide an `id_cfg` entry in the -source configuration (see [load_src_cfg()]), outlining the available ID +In order to use the ID conversion infrastructure offered by \code{ricu} for a +new dataset, it typically suffices to provide an \code{id_cfg} entry in the +source configuration (see \code{\link[=load_src_cfg]{load_src_cfg()}}), outlining the available ID systems alongside an ordering, as well as potentially a class specific -implementation of [id_map_helper()] for the given source class, specifying +implementation of \code{\link[=id_map_helper]{id_map_helper()}} for the given source class, specifying the corresponding time windows in 1 minute resolution (for every possible pair of IDs). -While both up- and downgrades for `id_tbl` objects, as well as downgrades -for `ts_tbl` objects are simple merge operations based on the ID mapping -provided by [id_map()], ID upgrades for `ts_tbl` objects are slightly more -involved. As an example, consider the following setting: we have `data` -associated with `hadm_id` IDs and times relative to hospital admission: +While both up- and downgrades for \code{id_tbl} objects, as well as downgrades +for \code{ts_tbl} objects are simple merge operations based on the ID mapping +provided by \code{\link[=id_map]{id_map()}}, ID upgrades for \code{ts_tbl} objects are slightly more +involved. As an example, consider the following setting: we have \code{data} +associated with \code{hadm_id} IDs and times relative to hospital admission: -``` - 1 2 3 4 5 6 7 8 +\if{html}{\out{
}}\preformatted{ 1 2 3 4 5 6 7 8 data ---*------*-------*--------*-------*-------*--------*------*--- 3h 10h 18h 27h 35h 43h 52h 59h @@ -103,17 +117,17 @@ hadm_id |-------------------------------------------------------------| icustay_id |------------------| |---------------| 0h 19h 0h 16h ICU_1 ICU_2 -``` +}\if{html}{\out{
}} -The mapping of data points from `hadm_id` to `icustay_id` is created as +The mapping of data points from \code{hadm_id} to \code{icustay_id} is created as follows: ICU stay end times mark boundaries and all data that is recorded after the last ICU stay ended is assigned to the last ICU stay. Therefore -data points 1-3 are assigned to `ICU_1`, while 4-8 are assigned to `ICU_2`. +data points 1-3 are assigned to \code{ICU_1}, while 4-8 are assigned to \code{ICU_2}. Times have to be shifted as well, as timestamps are expected to be relative to the current ID system. Data points 1-3 therefore are assigned to time stamps -4h, 3h and 11h, while data points 4-8 are assigned to -10h, -2h, 6h, 15h and 22h. Implementation-wise, the mapping is computed using an -efficient `data.table` rolling join. +efficient \code{data.table} rolling join. } \examples{ if (require(mimic.demo)) { diff --git a/man/data_env.Rd b/man/data_env.Rd index 1e4e4430..0f064f8d 100644 --- a/man/data_env.Rd +++ b/man/data_env.Rd @@ -12,6 +12,7 @@ \alias{aumc} \alias{miiv} \alias{sic} +\alias{picdb} \title{ICU datasets} \format{ The exported \code{data} environment contains all datasets that have been made @@ -43,57 +44,100 @@ hosted data source is available as well. As with the PhysioNet datasets, access is public but has to be granted by the data collectors. } \details{ -Setting up a dataset for use with `ricu` requires a configuration object. +Setting up a dataset for use with \code{ricu} requires a configuration object. For the included datasets, configuration can be loaded from -``` -system.file("extdata", "config", "data-sources.json", package = "ricu") -``` +\if{html}{\out{
}}\preformatted{system.file("extdata", "config", "data-sources.json", package = "ricu") +}\if{html}{\out{
}} -by calling [load_src_cfg()] and for dataset that are external to `ricu`, +by calling \code{\link[=load_src_cfg]{load_src_cfg()}} and for dataset that are external to \code{ricu}, additional configuration can be made available by setting the environment -variable `RICU_CONFIG_PATH` (for more information, refer to -[load_src_cfg()]). Using the dataset configuration object, data can be -downloaded ([download_src()]), imported ([import_src()]) and attached -([attach_src()]). While downloading and importing are one-time procedures, +variable \code{RICU_CONFIG_PATH} (for more information, refer to +\code{\link[=load_src_cfg]{load_src_cfg()}}). Using the dataset configuration object, data can be +downloaded (\code{\link[=download_src]{download_src()}}), imported (\code{\link[=import_src]{import_src()}}) and attached +(\code{\link[=attach_src]{attach_src()}}). While downloading and importing are one-time procedures, attaching of the dataset is repeated every time the package is loaded. Briefly, downloading loads the raw dataset from the internet (most likely -in `.csv` format), importing consists of some preprocessing to make the -data available more efficiently (by converting it to [`.fst`][fst::fst()] +in \code{.csv} format), importing consists of some preprocessing to make the +data available more efficiently (by converting it to \code{\link[fst:fst]{.fst}} format) and attaching sets up the data for use by the package. For more information on the individual steps, refer to the respective documentation pages. A dataset that has been successfully made available can interactively be explored by typing its name into the console and individual tables can be -inspected using the `$` function. For example for the MIMIC-III demo -dataset and the `icustays` table, this gives +inspected using the \code{$} function. For example for the MIMIC-III demo +dataset and the \code{icustays} table, this gives -```{r, eval = is_data_avail("mimic_demo")} -mimic_demo +\if{html}{\out{
}}\preformatted{mimic_demo +#> +#> admissions callout caregivers chartevents +#> [129 x 19] [77 x 24] [7,567 x 4] [758,355 x 15] +#> cptevents d_cpt d_icd_diagnoses d_icd_procedures +#> [1,579 x 12] [134 x 9] [14,567 x 4] [3,882 x 4] +#> d_items d_labitems datetimeevents diagnoses_icd +#> [12,487 x 10] [753 x 6] [15,551 x 14] [1,761 x 5] +#> drgcodes icustays inputevents_cv inputevents_mv +#> [297 x 8] [136 x 12] [34,799 x 22] [13,224 x 31] +#> labevents microbiologyevents outputevents patients +#> [76,074 x 9] [2,003 x 16] [11,320 x 13] [100 x 8] +#> prescriptions procedureevents_mv procedures_icd services +#> [10,398 x 19] [753 x 25] [506 x 5] [163 x 6] +#> transfers +#> [524 x 13] mimic_demo$icustays -``` +#> # : [136 x 12] +#> # ID options: subject_id (patient) < hadm_id (hadm) < icustay_id (icustay) +#> # Defaults: `intime` (index), `last_careunit` (val) +#> # Time vars: `intime`, `outtime` +#> row_id subject_id hadm_id icustay_id dbsource first_careunit last_careunit +#> +#> 1 12742 10006 142345 206504 carevue MICU MICU +#> 2 12747 10011 105331 232110 carevue MICU MICU +#> 3 12749 10013 165520 264446 carevue MICU MICU +#> 4 12754 10017 199207 204881 carevue CCU CCU +#> 5 12755 10019 177759 228977 carevue MICU MICU +#> ... +#> 132 42676 44083 198330 286428 metavision CCU CCU +#> 133 42691 44154 174245 217724 metavision MICU MICU +#> 134 42709 44212 163189 239396 metavision MICU MICU +#> 135 42712 44222 192189 238186 metavision CCU CCU +#> 136 42714 44228 103379 217992 metavision SICU SICU +#> # i 131 more rows +#> # i 5 more variables: first_wardid , last_wardid , intime , +#> # outtime , los +}\if{html}{\out{
}} Table subsets can be loaded into memory for example using the -[base::subset()] function, which uses non-standard evaluation (NSE) to +\code{\link[base:subset]{base::subset()}} function, which uses non-standard evaluation (NSE) to determine a row-subsetting. This design choice stems form the fact that some tables can have on the order of 10^8 rows, which makes loading full tables into memory an expensive operation. Table subsets loaded into -memory are represented as [`data.table`][data.table::data.table()] objects. +memory are represented as \code{\link[data.table:data.table]{data.table}} objects. Extending the above example, if only ICU stays corresponding to the patient -with `subject_id == 10124` are of interest, the respective data can be +with \code{subject_id == 10124} are of interest, the respective data can be loaded as -```{r, eval = is_data_avail("mimic_demo")} -subset(mimic_demo$icustays, subject_id == 10124) -``` +\if{html}{\out{
}}\preformatted{subset(mimic_demo$icustays, subject_id == 10124) +#> row_id subject_id hadm_id icustay_id dbsource first_careunit last_careunit +#> +#> 1: 12863 10124 182664 261764 carevue MICU MICU +#> 2: 12864 10124 170883 222779 carevue MICU MICU +#> 3: 12865 10124 170883 295043 carevue CCU CCU +#> 4: 12866 10124 170883 237528 carevue MICU MICU +#> first_wardid last_wardid intime outtime los +#> +#> 1: 23 23 2192-03-29 10:46:51 2192-04-01 06:36:00 2.8258 +#> 2: 50 50 2192-04-16 20:58:32 2192-04-20 08:51:28 3.4951 +#> 3: 7 7 2192-04-24 02:29:49 2192-04-26 23:59:45 2.8958 +#> 4: 23 23 2192-04-30 14:50:44 2192-05-15 23:34:21 15.3636 +}\if{html}{\out{
}} -Much care has been taken to make `ricu` extensible to new datasets. For -example the publicly available ICU database [AmsterdamUMCdb -](https://amsterdammedicaldatascience.nl/amsterdamumcdb/) +Much care has been taken to make \code{ricu} extensible to new datasets. For +example the publicly available ICU database \href{https://amsterdammedicaldatascience.nl/amsterdamumcdb/}{AmsterdamUMCdb } provided by the Amsterdam University Medical Center, currently is not part -of the core datasets of `ricu`, but code for integrating this dataset is -available on [github](https://github.com/eth-mds/aumc). +of the core datasets of \code{ricu}, but code for integrating this dataset is +available on \href{https://github.com/eth-mds/aumc}{github}. } \section{MIMIC-III}{ diff --git a/man/data_items.Rd b/man/data_items.Rd index e9fb9414..5255e5b2 100644 --- a/man/data_items.Rd +++ b/man/data_items.Rd @@ -6,6 +6,7 @@ \alias{init_itm} \alias{init_itm.sel_itm} \alias{init_itm.hrd_itm} +\alias{init_itm.sic_itm} \alias{init_itm.col_itm} \alias{init_itm.rgx_itm} \alias{init_itm.fun_itm} @@ -26,6 +27,8 @@ init_itm(x, ...) \method{init_itm}{hrd_itm}(x, table, sub_var, ids, callback = "identity_callback", ...) +\method{init_itm}{sic_itm}(x, table, sub_var, ids, callback = "identity_callback", ...) + \method{init_itm}{col_itm}(x, table, unit_val = NULL, callback = "identity_callback", ...) \method{init_itm}{rgx_itm}(x, table, sub_var, regex, callback = "identity_callback", ...) diff --git a/man/data_utils.Rd b/man/data_utils.Rd index 32216a45..765ac3c2 100644 --- a/man/data_utils.Rd +++ b/man/data_utils.Rd @@ -5,6 +5,7 @@ \alias{id_orig_helper} \alias{id_orig_helper.src_env} \alias{id_orig_helper.miiv_env} +\alias{id_orig_helper.sic_env} \alias{id_windows} \alias{id_win_helper} \alias{id_win_helper.mimic_env} @@ -13,6 +14,7 @@ \alias{id_win_helper.hirid_env} \alias{id_win_helper.aumc_env} \alias{id_win_helper.miiv_env} +\alias{id_win_helper.picdb_env} \alias{id_map} \alias{id_map_helper} \alias{id_map_helper.src_env} @@ -26,6 +28,8 @@ id_orig_helper(x, id) \method{id_orig_helper}{miiv_env}(x, id) +\method{id_orig_helper}{sic_env}(x, id) + id_windows(x, copy = TRUE) id_win_helper(x) @@ -42,6 +46,8 @@ id_win_helper(x) \method{id_win_helper}{miiv_env}(x) +\method{id_win_helper}{picdb_env}(x) + id_map(x, id_var, win_var, in_time = NULL, out_time = NULL) id_map_helper(x, id_var, win_var) diff --git a/man/file_utils.Rd b/man/file_utils.Rd index b9955f9b..a732de84 100644 --- a/man/file_utils.Rd +++ b/man/file_utils.Rd @@ -31,7 +31,8 @@ directory} \item{srcs}{Character vector of data source names, an object for which an \code{src_name()} method is defined or an arbitrary-length list thereof.} -\item{name}{File name of the configuration file (\code{.json} will be appended)} +\item{name}{File name of the configuration file (\code{.json} will be appended) +or name of a folder containing multiple configuration files.} \item{cfg_dirs}{Character vector of directories searched for config files} diff --git a/man/label_sep3.Rd b/man/label_sep3.Rd index 9fd07593..e9ac7d43 100644 --- a/man/label_sep3.Rd +++ b/man/label_sep3.Rd @@ -55,7 +55,90 @@ increase in SOFA score. The Sepsis-3 Consensus (Singer et. al.) defines sepsis as an acute increase in the SOFA score (see \code{\link[=sofa_score]{sofa_score()}}) of 2 points or more within the suspected infection (SI) window (see \code{\link[=susp_inf]{susp_inf()}}): -\figure{sofa-sep-3-1.png} + +\if{html}{\out{
}}\preformatted{#| sofa-sep-3, +#| echo = FALSE, +#| engine.opts = list( +#| extra.preamble = c( +#| "\\\\usepackage\{pgfplots\}", "\\\\pgfplotsset\{compat=newest\}" +#| ) +#| ) + +\\begin\{tikzpicture\} + + \\draw (-5.5, 0) -- (3.5, 0); + \\draw (-5.5, -0.2) -- (-5.5, 0.2); + \\draw (3.5, -0.2) -- (3.5, 0.2); + \\draw (0.5, -0.2) -- (0.5, 0.2); + + \\node[align = center] at (0.5, 0.5) \{SI time\}; + \\node[align = center] at (3.5, 0.5) \{SI window end\}; + \\node[align = center] at (-5.5, -0.5) \{SI window start\}; + + \\draw (-1.5, -0.2) -- (-1.5, 0.2); + \\draw[dashed] (-1.5, 2) -- (-1.5, 0); + \\node[align = center] at (-1.5, -0.5) \{Sepsis-3 time\}; + + \\node[align = center] at (-2.75, 0.5) \{-48 hours\}; + \\node[align = center] at (2, -0.5) \{24 hours\}; + + \\draw[dashed] (0.5, 0) -- (0.5, -1); + + \\draw (0.5, -1) -- (3.5, -1); + \\draw (3.5, -1.2) -- (3.5, -0.8); + \\draw (0.5, -1.2) -- (0.5, -0.8); + + \\node at (5.25, -1) \{within 24 hours\}; + + \\node[align = center] at (0.5, -1.5) \{ABX\}; + \\node[align = center] at (3.5, -1.5) \{Sampling\}; + + \\draw (0.5, -2) -- (9.5, -2); + \\draw (9.5, -2.2) -- (9.5, -1.8); + \\draw (0.5, -2.2) -- (0.5, -1.8); + + \\node[align = center] at (5.25, -2.5) \{within 72 hours\}; + + \\node[align = center] at (0.5, -2.5) \{Sampling\}; + \\node[align = center] at (9.5, -2.5) \{ABX\}; + + \\draw [decorate, decoration = \{brace, mirror, amplitude=5pt, raise=4pt\}, + yshift=0pt] (0, -0.9) -- (0, -2.1); + \\node at (-3, -1.5) \{Either option is permissible\}; + + \\filldraw (-6, 1.5) circle (1pt); + \\draw (-6, 1.5) -- (-5.5, 1.5); + \\filldraw (-5.5, 1.5) circle (1pt); + \\draw (-5.5, 1.5) -- (-5, 1); + \\filldraw (-5, 1) circle (1pt); + \\draw (-5, 1) -- (-4.5, 1); + \\filldraw (-4.5, 1) circle (1pt); + \\draw (-4.5, 1) -- (-4, 1); + \\filldraw (-4, 1) circle (1pt); + \\draw (-4, 1) -- (-3.5, 1); + \\filldraw (-3.5, 1) circle (1pt); + \\draw (-3.5, 1) -- (-3, 1.5); + \\filldraw (-3, 1.5) circle (1pt); + \\draw (-3, 1.5) -- (-2.5, 1.5); + \\filldraw (-2.5, 1.5) circle (1pt); + \\draw (-2.5, 1.5) -- (-2, 1.5); + \\filldraw (-2, 1.5) circle (1pt); + \\draw (-2, 1.5) -- (-1.5, 2.0); + \\filldraw (-1.5, 2.0) circle (1pt); + + \\draw [decorate, decoration = \{brace, amplitude=5pt, mirror, raise=4pt\}, + yshift=0pt] (-1.25, 1) -- (-1.25, 2); + \\node [black] at (0.25, 1.5) \{$\\Delta$SOFA $\\geq 2$\}; + + \\draw (-6.5, 1) -- (-6.5, 2.5); + \\node at (-6.5, 3) \{SOFA\}; + \\draw (-6.5, 1) -- (-6.6, 1) node[left]\{0\}; + \\draw (-6.5, 1.5) -- (-6.6, 1.5) node[left]\{1\}; + \\draw (-6.5, 2) -- (-6.6, 2) node[left]\{2\}; + \\draw (-6.5, 2.5) -- (-6.6, 2.5) node[left]\{3\}; + +\\end\{tikzpicture\} +}\if{html}{\out{
}} A patient can potentially have multiple SI windows. The argument \code{si_window} is used to control which SI window we focus on (options are diff --git a/man/load_src.Rd b/man/load_src.Rd index cf0c3dbc..a20ec4d3 100644 --- a/man/load_src.Rd +++ b/man/load_src.Rd @@ -11,6 +11,7 @@ \alias{load_difftime.aumc_tbl} \alias{load_difftime.miiv_tbl} \alias{load_difftime.sic_tbl} +\alias{load_difftime.picdb_tbl} \alias{load_difftime.character} \title{Low level functions for loading data} \usage{ @@ -76,6 +77,15 @@ load_difftime(x, ...) ... ) +\method{load_difftime}{picdb_tbl}( + x, + rows, + cols = colnames(x), + id_hint = id_vars(x), + time_vars = ricu::time_vars(x), + ... +) + \method{load_difftime}{character}(x, src, ...) } \arguments{ From 1a09114f86aa05ac7f28a4c73246566dbfb24d0c Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Tue, 26 Mar 2024 23:42:57 +0100 Subject: [PATCH 35/54] Add qpdf --- environment.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 1e0cfd86..e9c036fc 100644 --- a/environment.yml +++ b/environment.yml @@ -34,4 +34,5 @@ dependencies: - r-testthat - r-mockthat - r-pkgload - - r-codetools \ No newline at end of file + - r-codetools + - qpdf \ No newline at end of file From 7b0637a529ad4c7ab4378e874eeb74dbdc80909e Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Tue, 26 Mar 2024 23:49:15 +0100 Subject: [PATCH 36/54] Add env var --- .github/workflows/check.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 15370d34..f5f154a5 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -36,6 +36,7 @@ jobs: R CMD build . && R CMD check --as-cran $(ls -t . | head -n1) --no-manual env: _R_CHECK_CRAN_INCOMING_: false + _R_CHECK_FORCE_SUGGESTS_: false _R_CHECK_DOC_SIZES_: false - name: Check for warnings shell: bash -l {0} From f99df7425a9a2db025973013ea503eb78e7be3e2 Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Tue, 26 Mar 2024 23:50:37 +0100 Subject: [PATCH 37/54] Add env var to check step --- .github/workflows/check.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index f5f154a5..34bb220f 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -56,4 +56,8 @@ jobs: echo "Found warnings, treated as errors." cat $CHECK_LOG_FILE exit 1 - fi \ No newline at end of file + fi + env: + _R_CHECK_CRAN_INCOMING_: false + _R_CHECK_FORCE_SUGGESTS_: false + _R_CHECK_DOC_SIZES_: false \ No newline at end of file From 3a3636a245596e8750663b642016aa42a285fd6b Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Tue, 26 Mar 2024 23:54:14 +0100 Subject: [PATCH 38/54] Edit --- .github/workflows/check.yaml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 34bb220f..d48ddbc9 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -33,7 +33,7 @@ jobs: - name: Run R CMD check shell: bash -l {0} run: | - R CMD build . && R CMD check --as-cran $(ls -t . | head -n1) --no-manual + R CMD build . && R CMD check --no-manual --as-cran $(ls -t . | head -n1) env: _R_CHECK_CRAN_INCOMING_: false _R_CHECK_FORCE_SUGGESTS_: false @@ -56,8 +56,4 @@ jobs: echo "Found warnings, treated as errors." cat $CHECK_LOG_FILE exit 1 - fi - env: - _R_CHECK_CRAN_INCOMING_: false - _R_CHECK_FORCE_SUGGESTS_: false - _R_CHECK_DOC_SIZES_: false \ No newline at end of file + fi \ No newline at end of file From 59a9df42023ac4ff8268950b959bd860e0960ade Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Wed, 27 Mar 2024 00:06:49 +0100 Subject: [PATCH 39/54] Change to r-qpdf --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index e9c036fc..6bc46369 100644 --- a/environment.yml +++ b/environment.yml @@ -35,4 +35,4 @@ dependencies: - r-mockthat - r-pkgload - r-codetools - - qpdf \ No newline at end of file + - r-qpdf \ No newline at end of file From 21d420f6084c4c873d71f6b049bf16ae07d1511e Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Wed, 27 Mar 2024 00:13:00 +0100 Subject: [PATCH 40/54] Add qpdf --- environment.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 6bc46369..ff62ed10 100644 --- a/environment.yml +++ b/environment.yml @@ -35,4 +35,5 @@ dependencies: - r-mockthat - r-pkgload - r-codetools - - r-qpdf \ No newline at end of file + - r-qpdf + - qpdf \ No newline at end of file From df337093ae18b3fae16acd2f0436742fe74c7dd1 Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Wed, 27 Mar 2024 00:20:04 +0100 Subject: [PATCH 41/54] remove force --- .github/workflows/check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index d48ddbc9..1550ee50 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -25,7 +25,7 @@ jobs: - name: Install TinyTex shell: bash -l {0} run: | - Rscript -e 'tinytex::install_tinytex(force = TRUE)' + Rscript -e 'tinytex::install_tinytex()' - name: Install demo datasets shell: bash -l {0} run: | From 2d83a62a8d578ca2763031f9e89cdfff5a650a7f Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Wed, 27 Mar 2024 00:20:49 +0100 Subject: [PATCH 42/54] remove env var --- .github/workflows/check.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 1550ee50..bd88ffe1 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -37,7 +37,6 @@ jobs: env: _R_CHECK_CRAN_INCOMING_: false _R_CHECK_FORCE_SUGGESTS_: false - _R_CHECK_DOC_SIZES_: false - name: Check for warnings shell: bash -l {0} run: | From ea49009c00069099558ebe8d55e8dc19f5131558 Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Wed, 27 Mar 2024 00:32:38 +0100 Subject: [PATCH 43/54] grep exclude pdf size warning --- .github/workflows/check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index bd88ffe1..57dec6d4 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -51,7 +51,7 @@ jobs: cat $CHECK_LOG_FILE exit 1 fi - if cat $CHECK_LOG_FILE | grep -q "WARNING"; then + if cat $CHECK_LOG_FILE | grep -q "WARNING" | grep -q -v -e "checking sizes of PDF files under β€˜inst/doc’ ... WARNING"; then echo "Found warnings, treated as errors." cat $CHECK_LOG_FILE exit 1 From 4e2066b7eb6a6e2f82c5f0fd2f462446263784d0 Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Wed, 27 Mar 2024 00:40:53 +0100 Subject: [PATCH 44/54] don't cache conda env --- .github/workflows/check.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 57dec6d4..dc83a199 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -20,8 +20,6 @@ jobs: - uses: actions/checkout@v4 - name: Set up Conda env uses: mamba-org/provision-with-micromamba@e2b397b12d0a38069451664382b769c9456e3d6d - with: - cache-env: true - name: Install TinyTex shell: bash -l {0} run: | From 3a2680292cf21b9849e62157edef05de145a6e7b Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Wed, 27 Mar 2024 00:42:48 +0100 Subject: [PATCH 45/54] Add caching back --- .github/workflows/check.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index dc83a199..57dec6d4 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -20,6 +20,8 @@ jobs: - uses: actions/checkout@v4 - name: Set up Conda env uses: mamba-org/provision-with-micromamba@e2b397b12d0a38069451664382b769c9456e3d6d + with: + cache-env: true - name: Install TinyTex shell: bash -l {0} run: | From a1dce8d8ecd332b92f6bab7fc56b0c3ab80deee3 Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Wed, 27 Mar 2024 00:52:41 +0100 Subject: [PATCH 46/54] ch sh --- .github/workflows/check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 57dec6d4..a95d99f5 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -23,7 +23,7 @@ jobs: with: cache-env: true - name: Install TinyTex - shell: bash -l {0} + shell: sh -l {0} run: | Rscript -e 'tinytex::install_tinytex()' - name: Install demo datasets From 7beb4d7d2f4fedf6b273011f554a3c227f6355e4 Mon Sep 17 00:00:00 2001 From: Manuel Burger Date: Wed, 27 Mar 2024 00:54:20 +0100 Subject: [PATCH 47/54] Revert --- .github/workflows/check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index a95d99f5..57dec6d4 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -23,7 +23,7 @@ jobs: with: cache-env: true - name: Install TinyTex - shell: sh -l {0} + shell: bash -l {0} run: | Rscript -e 'tinytex::install_tinytex()' - name: Install demo datasets From db41842d8eaf9780acc599a7655780144f40be79 Mon Sep 17 00:00:00 2001 From: Malte Londschien Date: Wed, 27 Mar 2024 11:56:09 +0100 Subject: [PATCH 48/54] Delete coverage.yaml, pkgdown.yaml --- .github/workflows/coverage.yaml | 36 ------------------------- .github/workflows/pkgdown.yaml | 48 --------------------------------- 2 files changed, 84 deletions(-) delete mode 100644 .github/workflows/coverage.yaml delete mode 100644 .github/workflows/pkgdown.yaml diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml deleted file mode 100644 index 393a7a9a..00000000 --- a/.github/workflows/coverage.yaml +++ /dev/null @@ -1,36 +0,0 @@ -on: - push: - branches: - - main - pull_request: - branches: - - main - -name: coverage - -jobs: - coverage: - runs-on: ubuntu-latest - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - - steps: - - uses: actions/checkout@v2 - - - uses: r-lib/actions/setup-r@v2 - with: - use-public-rspm: true - - - uses: r-lib/actions/setup-pandoc@v2 - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: | - any::covr - eth-mds/mimic-demo - eth-mds/eicu-demo - nbenn/mockthat - - - name: Test coverage - run: covr::codecov(quiet = FALSE) - shell: Rscript {0} diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml deleted file mode 100644 index ac50c59e..00000000 --- a/.github/workflows/pkgdown.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# on: -# push: -# branches: -# - main -# pull_request: -# branches: -# - main - -# name: pkgdown - -# jobs: -# pkgdown: -# runs-on: ubuntu-latest -# env: -# GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - -# steps: -# - uses: actions/checkout@v2 - -# - uses: r-lib/actions/setup-tinytex@v2 -# - run: tlmgr --version - -# - uses: r-lib/actions/setup-pandoc@v2 - -# - uses: r-lib/actions/setup-r@v2 -# with: -# use-public-rspm: true - -# - uses: r-lib/actions/setup-r-dependencies@v2 -# with: -# extra-packages: | -# any::pkgdown -# local::. -# eth-mds/mimic-demo -# eth-mds/eicu-demo -# nbenn/mockthat - -# - name: Build site -# run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) -# shell: Rscript {0} - -# - name: Deploy to GitHub pages πŸš€ -# if: github.event_name != 'pull_request' -# uses: JamesIves/github-pages-deploy-action@4.1.4 -# with: -# clean: false -# branch: gh-pages -# folder: docs From 68af794d509ad2af7e8a99793ff7d00d64c3100a Mon Sep 17 00:00:00 2001 From: Malte Londschien Date: Wed, 27 Mar 2024 11:56:28 +0100 Subject: [PATCH 49/54] Add comment to check.yaml, only run this on ubuntu. --- .github/workflows/check.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 57dec6d4..a651b1e7 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - os: ['ubuntu-latest', 'macos-latest'] # , 'windows-latest'] + os: ['ubuntu-latest'] steps: - uses: actions/checkout@v4 @@ -37,6 +37,8 @@ jobs: env: _R_CHECK_CRAN_INCOMING_: false _R_CHECK_FORCE_SUGGESTS_: false + # R CMD check raises a warning by qpdf that the generated docs PDF is large and + # should be compressed. Currently we ignore this warning via the grep below. - name: Check for warnings shell: bash -l {0} run: | From 7a521dbcbc5c82ff7d068886fdcd7a1648d5a903 Mon Sep 17 00:00:00 2001 From: Malte Londschien Date: Wed, 27 Mar 2024 11:58:37 +0100 Subject: [PATCH 50/54] cleanup environment.yamls. --- environment.yml | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 environment.yml diff --git a/environment.yml b/environment.yml deleted file mode 100644 index ff62ed10..00000000 --- a/environment.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: ricu -channels: - - nodefaults - - conda-forge -dependencies: - - r-base - - r-data.table - - r-curl - - r-assertthat - - r-fst - - r-readr - - r-jsonlite - - r-prt>=0.1.2 - - r-tibble - - r-backports - - r-rlang - - r-vctrs - - r-cli>=2.1.0 - - r-fansi - - r-openssl - # optional - - r-rticles - - r-forestmodel - - r-ggplot2 - - r-survival - - r-kableExtra - - r-magick - - r-cowplot - - r-knitr - - r-pdftools - - r-covr - - r-units - - r-tinytex - - r-testthat - - r-mockthat - - r-pkgload - - r-codetools - - r-qpdf - - qpdf \ No newline at end of file From 7f3b7bf05a4460df3288c4903a507e327d43207b Mon Sep 17 00:00:00 2001 From: Malte Londschien Date: Wed, 27 Mar 2024 11:58:56 +0100 Subject: [PATCH 51/54] cleanup environment.yamls 2. --- environment.yaml | 20 +++++++++++++++++++- test_environment.yaml | 32 -------------------------------- 2 files changed, 19 insertions(+), 33 deletions(-) delete mode 100644 test_environment.yaml diff --git a/environment.yaml b/environment.yaml index f8cb700d..ff62ed10 100644 --- a/environment.yaml +++ b/environment.yaml @@ -18,4 +18,22 @@ dependencies: - r-cli>=2.1.0 - r-fansi - r-openssl - - r-utils \ No newline at end of file + # optional + - r-rticles + - r-forestmodel + - r-ggplot2 + - r-survival + - r-kableExtra + - r-magick + - r-cowplot + - r-knitr + - r-pdftools + - r-covr + - r-units + - r-tinytex + - r-testthat + - r-mockthat + - r-pkgload + - r-codetools + - r-qpdf + - qpdf \ No newline at end of file diff --git a/test_environment.yaml b/test_environment.yaml deleted file mode 100644 index 9c0c12a8..00000000 --- a/test_environment.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: ricu-test -channels: - - nodefaults - - conda-forge -dependencies: - - r-base - - r-data.table - - r-curl - - r-assertthat - - r-fst - - r-readr - - r-jsonlite - - r-prt>=0.1.2 - - r-tibble - - r-backports - - r-rlang - - r-vctrs - - r-cli>=2.1.0 - - r-fansi - - r-openssl - - r-units - # optional - - r-rticles - - r-forestmodel - - r-ggplot2 - - r-survival - - r-kableExtra - - r-magick - - r-cowplot - - r-knitr - - r-pdftools - - r-covr \ No newline at end of file From 490c6165f3a789c2b69aa56673ab7c4994c26f5c Mon Sep 17 00:00:00 2001 From: Malte Londschien Date: Wed, 27 Mar 2024 11:59:39 +0100 Subject: [PATCH 52/54] mimic-demo is on conda-forge. --- .github/workflows/check.yaml | 2 +- environment.yaml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index a651b1e7..605a5775 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -29,7 +29,7 @@ jobs: - name: Install demo datasets shell: bash -l {0} run: | - Rscript -e 'install.packages(c("mimic.demo", "eicu.demo"), repos="https://eth-mds.github.io/physionet-demo")' + Rscript -e 'install.packages("eicu.demo", repos="https://eth-mds.github.io/physionet-demo")' - name: Run R CMD check shell: bash -l {0} run: | diff --git a/environment.yaml b/environment.yaml index ff62ed10..fa3dd30d 100644 --- a/environment.yaml +++ b/environment.yaml @@ -36,4 +36,5 @@ dependencies: - r-pkgload - r-codetools - r-qpdf - - qpdf \ No newline at end of file + - qpdf + - r-mimic-demo \ No newline at end of file From 7a99192d7c16a85cadc88ba5528dc80205787390 Mon Sep 17 00:00:00 2001 From: Malte Londschien Date: Wed, 27 Mar 2024 12:01:57 +0100 Subject: [PATCH 53/54] yaml -> yml. --- environment.yaml => environment.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename environment.yaml => environment.yml (100%) diff --git a/environment.yaml b/environment.yml similarity index 100% rename from environment.yaml rename to environment.yml From db791e6267df81befb1a75d77ab77e752d7f218d Mon Sep 17 00:00:00 2001 From: Malte Londschien Date: Wed, 27 Mar 2024 12:03:16 +0100 Subject: [PATCH 54/54] r-mimic-demo -> r-mimic.demo --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index fa3dd30d..c94682a9 100644 --- a/environment.yml +++ b/environment.yml @@ -37,4 +37,4 @@ dependencies: - r-codetools - r-qpdf - qpdf - - r-mimic-demo \ No newline at end of file + - r-mimic.demo \ No newline at end of file