Skip to content

Commit

Permalink
Update characterization-cohorts.R
Browse files Browse the repository at this point in the history
missing values in database comparison was causing an error.  This is fixed by imputing 0 when values are NA.
  • Loading branch information
jreps committed Sep 23, 2024
1 parent 58118c4 commit 22e0ebf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions R/characterization-cohorts.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down

0 comments on commit 22e0ebf

Please sign in to comment.