Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.2.0 #46

Merged
merged 2 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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", , "[email protected]", role = c("aut", "cre")),
Expand All @@ -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,
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
12 changes: 9 additions & 3 deletions R/AggregateCovariates.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(
Expand Down Expand Up @@ -81,7 +85,8 @@ createAggregateCovariateSettings <- function(
startAnchor = startAnchor,
riskWindowEnd = riskWindowEnd,
endAnchor = endAnchor,
covariateSettings = covariateSettings
covariateSettings = covariateSettings,
minCharacterizationMean = minCharacterizationMean
)

class(result) <- "aggregateCovariateSettings"
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ targetIds <- c(1,2,4)
useDemographicsAge = T,
useDemographicsRace = T
)
)
)

aggregateCovariateSettings2 <- createAggregateCovariateSettings(
targetIds = targetIds,
Expand Down
4 changes: 2 additions & 2 deletions docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/articles/InstallationGuide.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading