From c779ca34b0c28ff86176ecbac533f457b165aa7a Mon Sep 17 00:00:00 2001 From: Anthony Sena Date: Fri, 28 Jun 2024 13:52:47 -0400 Subject: [PATCH] Preserve data.frame format --- R/CohortCount.R | 2 +- R/RunCohortGeneration.R | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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] ) }