From 9300affa9b2d4536727fd4603108ec8dc16de38c Mon Sep 17 00:00:00 2001 From: Anthony Sena Date: Wed, 12 Jun 2024 17:47:16 -0400 Subject: [PATCH] Fixing R CMD check notes --- DESCRIPTION | 3 ++- R/CohortCount.R | 12 +++++++----- R/Export.R | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e3d8f4d..07f4137 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -29,7 +29,8 @@ Imports: jsonlite, ResultModelManager, SqlRender (>= 1.11.1), - stringi (>= 1.7.6) + stringi (>= 1.7.6), + zip Suggests: CirceR (>= 1.1.1), Eunomia, diff --git a/R/CohortCount.R b/R/CohortCount.R index faf1378..627da7a 100644 --- a/R/CohortCount.R +++ b/R/CohortCount.R @@ -81,11 +81,13 @@ getCohortCounts <- function(connectionDetails = NULL, by = "cohortId", all.y = TRUE ) - counts <- transform( - counts, - cohortEntries = ifelse(is.na(cohortEntries), 0L, cohortEntries), - cohortSubjects = ifelse(is.na(cohortSubjects), 0L, cohortSubjects) - ) + with(counts, { + transform( + counts, + cohortEntries = ifelse(is.na(cohortEntries), 0L, cohortEntries), + cohortSubjects = ifelse(is.na(cohortSubjects), 0L, cohortSubjects) + ) + }) } if (!is.null(databaseId)) { counts$databaseId <- databaseId diff --git a/R/Export.R b/R/Export.R index 971f3a8..f645904 100644 --- a/R/Export.R +++ b/R/Export.R @@ -113,7 +113,7 @@ exportCohortStatsTables <- function(connectionDetails, cohortDatabaseSchema = cohortDatabaseSchema, databaseId = databaseId, snakeCaseToCamelCase = snakeCaseToCamelCase, - cohortTableName = cohortTableNames + cohortTableNames = cohortTableNames ) for (i in 1:nrow(tablesToExport)) {