From 22e0ebf04ffee2bffb69120ea9074f186e0c63d8 Mon Sep 17 00:00:00 2001 From: jreps Date: Mon, 23 Sep 2024 15:33:12 -0400 Subject: [PATCH] Update characterization-cohorts.R missing values in database comparison was causing an error. This is fixed by imputing 0 when values are NA. --- R/characterization-cohorts.R | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/R/characterization-cohorts.R b/R/characterization-cohorts.R index 20ab24c..40fb437 100644 --- a/R/characterization-cohorts.R +++ b/R/characterization-cohorts.R @@ -969,6 +969,10 @@ characterizatonGetCohortComparisonDataContinuous <- function( -"settingId", -"targetCohortId", -"outcomeCohortId", -"cohortType") %>% dplyr::relocate("databaseName", .after = "covariateName") + + # fill missing values with 0 + res[is.na(res)] <- 0 + } shiny::incProgress(4/4, detail = paste("Done"))