From b670b4b02c4a7b81b791191521bb5255be28d125 Mon Sep 17 00:00:00 2001 From: Christina Fillmore <55274484+statasaurus@users.noreply.github.com> Date: Wed, 1 Mar 2023 21:44:33 +0000 Subject: [PATCH 1/5] resolve join issues --- DESCRIPTION | 2 +- NEWS.md | 3 +++ R/metacore.R | 11 ++++++++--- tests/testthat/test-metacore.R | 19 ------------------- 4 files changed, 12 insertions(+), 23 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 4411353..f532941 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: metacore Title: A Centralized Metadata Object Focus on Clinical Trial Data Programming Workflows -Version: 0.1.1 +Version: 0.1.2 Authors@R: c(person(given = "Christina", family = "Fillmore", diff --git a/NEWS.md b/NEWS.md index f3c62f7..10058b6 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,6 @@ +# Metacroe 0.1.2 +- Update to resolve issues from the dplyr updates + # Metacore 0.1.1 - Add variable cross checks to check consistent use of label, type, and format - Add `is_metacore()` function to check if it is a metacore object diff --git a/R/metacore.R b/R/metacore.R index 8447cb0..4e8de34 100644 --- a/R/metacore.R +++ b/R/metacore.R @@ -185,14 +185,19 @@ MetaCore_filter <- function(value) { # remove the temporary column select(-dataset) %>% # right join - right_join(private$.ds_vars %>% select(variable), by="variable") %>% + right_join(private$.ds_vars %>% select(variable), by="variable", + multiple = "all") %>% distinct(variable, .keep_all = TRUE) # for when duplicates gett through and have different lables but the same name private$.derivations <- private$.derivations %>% - right_join(private$.value_spec %>% select(derivation_id) %>% na.omit(), by = "derivation_id") + right_join(private$.value_spec %>% + select(derivation_id) %>% + na.omit(), by = "derivation_id", multiple = "all") private$.codelist <- private$.codelist %>% - right_join(private$.value_spec %>% select(code_id) %>% na.omit(), by = "code_id") + right_join(private$.value_spec %>% + select(code_id) %>% + na.omit(), by = "code_id", multiple = "all") private$.supp <- private$.supp %>% filter(dataset == value) } diff --git a/tests/testthat/test-metacore.R b/tests/testthat/test-metacore.R index 655a1a6..840d1ce 100644 --- a/tests/testthat/test-metacore.R +++ b/tests/testthat/test-metacore.R @@ -23,25 +23,6 @@ with_dir <- function (new, code) { force(code) } -# test_that("metacore print function works", { -# private <- list(.ds_pec = data.frame(dataset = c("a", "b", "c"), structure = 1:3)) -# MetaCore_print(const) -# }) - -# -# test_that("metacore init function works", { -# }) -# -# test_that("metacore filter works", { -# }) -# -# test_that("select_dataset works", { -# }) - -# -# test_that("metacore_filter works", { -# -# }) test_that("readonly function factory", { a <- readonly("a") From fcfdcc811b65b77666d8f44957d65ed27354fb2e Mon Sep 17 00:00:00 2001 From: Christina Fillmore <55274484+statasaurus@users.noreply.github.com> Date: Thu, 2 Mar 2023 01:12:49 +0000 Subject: [PATCH 2/5] stop running the long running example --- R/metacore.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/metacore.R b/R/metacore.R index 4e8de34..1f804c0 100644 --- a/R/metacore.R +++ b/R/metacore.R @@ -367,9 +367,11 @@ select_dataset <- function(.data, dataset, simplify = FALSE) { #' @importFrom rlang as_label enexpr as_name #' #' @examples +#' \dontrun{ #' meta_ex <- spec_to_metacore(metacore_example("p21_mock.xlsx")) #' get_control_term(meta_ex, QVAL, SUPPAE) #' get_control_term(meta_ex, "QVAL", "SUPPAE") +#' } get_control_term <- function(metacode, variable, dataset = NULL){ var_str <- ifelse(str_detect(as_label(enexpr(variable)), "\""), as_name(variable), as_label(enexpr(variable))) From e629b4cce2d7797afd0bb030bc84611d1fdc6dc1 Mon Sep 17 00:00:00 2001 From: Christina Fillmore <55274484+statasaurus@users.noreply.github.com> Date: Thu, 2 Mar 2023 14:56:36 +0000 Subject: [PATCH 3/5] Be more explicit about fixing issues --- cran-comments.md | 1 + 1 file changed, 1 insertion(+) diff --git a/cran-comments.md b/cran-comments.md index dd61fcf..5ba5fc6 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,5 +1,6 @@ ## R CMD check results There were no ERRORs or WARNINGs. +The issues that cause this to be archived have been resolved ## Downstream dependencies I have checked with the dependencies for this package From 19f745b2d3fdaa5b570d07964c96f9044756c9c9 Mon Sep 17 00:00:00 2001 From: Christina Fillmore <55274484+statasaurus@users.noreply.github.com> Date: Fri, 26 May 2023 13:42:54 +0100 Subject: [PATCH 4/5] Update actions --- .github/workflows/check-standard.yaml | 4 ++-- .github/workflows/test-coverage.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index 242e3d8..524fb30 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -40,11 +40,11 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: r-lib/actions/setup-r@v1 + - uses: r-lib/actions/setup-r@v2 with: r-version: ${{ matrix.config.r }} - - uses: r-lib/actions/setup-pandoc@v1 + - uses: r-lib/actions/setup-pandoc@v2 - name: Query dependencies run: | diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 106bec0..f854baf 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -20,9 +20,9 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: r-lib/actions/setup-r@v1 + - uses: r-lib/actions/setup-r@v2 - - uses: r-lib/actions/setup-pandoc@v1 + - uses: r-lib/actions/setup-pandoc@v2 - name: Query dependencies run: | From 94a251930da4e2791cb9b9487bedd781109154d7 Mon Sep 17 00:00:00 2001 From: Christina Fillmore <55274484+statasaurus@users.noreply.github.com> Date: Fri, 26 May 2023 13:57:16 +0100 Subject: [PATCH 5/5] update pkgdown yaml as well --- .github/workflows/pkgdown.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 1abece4..854000b 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -14,9 +14,9 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: r-lib/actions/setup-r@v1 + - uses: r-lib/actions/setup-r@v2 - - uses: r-lib/actions/setup-pandoc@v1 + - uses: r-lib/actions/setup-pandoc@v2 - name: Query dependencies run: |