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/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: | 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: | 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..1f804c0 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) } @@ -362,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))) 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 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")