diff --git a/DESCRIPTION b/DESCRIPTION index 8f7a543..f9ef5fb 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: Characterization Type: Package Title: Characterizations of Cohorts -Version: 0.1.5 +Version: 0.2.0 Date: 2024-04-03 Authors@R: c( person("Jenna", "Reps", , "reps@ohdsi.org", role = c("aut", "cre")), @@ -17,7 +17,7 @@ Depends: Imports: Andromeda, DatabaseConnector (>= 6.3.1), - FeatureExtraction (>= 3.0.0), + FeatureExtraction (>= 3.5.0), SqlRender (>= 1.9.0), ParallelLogger (>= 3.0.0), checkmate, diff --git a/NEWS.md b/NEWS.md index acf123e..c004996 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,8 @@ +Characterization 0.2.0 +====================== +Updated dependency to FeatureExtraction (>= 3.5.0) to support minCharacterizationMean paramater. + + Characterization 0.1.5 ====================== Changed export to csv approach to use batch export from SQLite (#41) diff --git a/R/AggregateCovariates.R b/R/AggregateCovariates.R index bad74ec..2f043f9 100644 --- a/R/AggregateCovariates.R +++ b/R/AggregateCovariates.R @@ -21,6 +21,9 @@ #' @param minPriorObservation The minimum time in the database a patient in the target cohorts must be observed prior to index #' @template timeAtRisk #' @param covariateSettings An object created using \code{FeatureExtraction::createCovariateSettings} +#' @param minCharacterizationMean The minimum mean value for characterization output. Values below this will be cut off from output. This +#' will help reduce the file size of the characterization output, but will remove information +#' on covariates that have very low values. The default is 0. #' #' @return #' A list with the settings @@ -34,7 +37,8 @@ createAggregateCovariateSettings <- function( startAnchor = "cohort start", riskWindowEnd = 365, endAnchor = "cohort start", - covariateSettings) { + covariateSettings, + minCharacterizationMean = 0) { errorMessages <- checkmate::makeAssertCollection() # check targetIds is a vector of int/double .checkCohortIds( @@ -81,7 +85,8 @@ createAggregateCovariateSettings <- function( startAnchor = startAnchor, riskWindowEnd = riskWindowEnd, endAnchor = endAnchor, - covariateSettings = covariateSettings + covariateSettings = covariateSettings, + minCharacterizationMean = minCharacterizationMean ) class(result) <- "aggregateCovariateSettings" @@ -163,7 +168,8 @@ computeAggregateCovariateAnalyses <- function( cohortId = -1, covariateSettings = aggregateCovariateSettings$covariateSettings, cdmVersion = cdmVersion, - aggregated = T + aggregated = T, + minCharacterizationMean = aggregateCovariateSettings$minCharacterizationMean ) # adding counts as a new table result$cohortCounts <- counts diff --git a/README.md b/README.md index 05b19e2..b3668ec 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ targetIds <- c(1,2,4) useDemographicsAge = T, useDemographicsRace = T ) - ) + ) aggregateCovariateSettings2 <- createAggregateCovariateSettings( targetIds = targetIds, diff --git a/docs/404.html b/docs/404.html index a8cd17d..16fc3ae 100644 --- a/docs/404.html +++ b/docs/404.html @@ -32,7 +32,7 @@ Characterization - 0.1.5 + 0.2.0 @@ -71,7 +71,7 @@