From fdbf8e97aee720df3d6965179745d73105c70df5 Mon Sep 17 00:00:00 2001 From: Anthony Sena Date: Fri, 28 Jun 2024 16:41:04 -0400 Subject: [PATCH] runCohortGenerator bug fix & remove R4.2.3 tests (#171) * Preserve data.frame format * Remove R4.2.3 tests --- .github/workflows/R_CMD_check_Hades.yaml | 3 --- R/CohortCount.R | 2 +- R/RunCohortGeneration.R | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/R_CMD_check_Hades.yaml b/.github/workflows/R_CMD_check_Hades.yaml index 7a83b89..96923df 100644 --- a/.github/workflows/R_CMD_check_Hades.yaml +++ b/.github/workflows/R_CMD_check_Hades.yaml @@ -20,9 +20,6 @@ jobs: fail-fast: false matrix: config: - - {os: windows-latest, r: '4.2.3', rtools: '42', rspm: "https://cloud.r-project.org"} - - {os: macOS-latest, r: '4.2.3', rtools: '42', rspm: "https://cloud.r-project.org"} - - {os: ubuntu-20.04, r: '4.2.3', rtools: '42', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} - {os: windows-latest, r: 'release', rtools: '', rspm: "https://cloud.r-project.org"} - {os: macOS-latest, r: 'release', rtools: '', rspm: "https://cloud.r-project.org"} - {os: ubuntu-20.04, r: 'release', rtools: '', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} diff --git a/R/CohortCount.R b/R/CohortCount.R index bad69d3..7adad6c 100644 --- a/R/CohortCount.R +++ b/R/CohortCount.R @@ -77,7 +77,7 @@ getCohortCounts <- function(connectionDetails = NULL, } counts <- merge( x = counts, - y = cohortDefinitionSet[cohortDefinitionSet$cohortId %in% cohortIds, ], + y = cohortDefinitionSet[cohortDefinitionSet$cohortId %in% cohortIds, , drop = FALSE], by = "cohortId", all.y = TRUE ) diff --git a/R/RunCohortGeneration.R b/R/RunCohortGeneration.R index e77a324..a44d5b6 100644 --- a/R/RunCohortGeneration.R +++ b/R/RunCohortGeneration.R @@ -288,7 +288,7 @@ generateAndExportNegativeControls <- function(connection, cohortDatabaseSchema = cohortDatabaseSchema, cohortTable = cohortTableNames$cohortTable, databaseId = databaseId, - cohortDefinitionSet = negativeControlOutcomeCohortSet[,c("cohortId")] + cohortDefinitionSet = negativeControlOutcomeCohortSet[,c("cohortId"), drop = FALSE] ) }