Skip to content

Commit 6d8d51d

Browse files
committed
Merge branch 'develop'
2 parents de27d57 + 9e87b12 commit 6d8d51d

File tree

153 files changed

+608
-309
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+608
-309
lines changed

DESCRIPTION

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Package: CohortMethod
22
Type: Package
33
Title: New-User Cohort Method with Large Scale Propensity and Outcome Models
4-
Version: 5.2.0
5-
Date: 2023-12-21
4+
Version: 5.2.1
5+
Date: 2024-02-01
66
Authors@R: c(
77
person("Martijn", "Schuemie", , "[email protected]", role = c("aut", "cre")),
88
person("Marc", "Suchard", role = c("aut")),
@@ -70,6 +70,6 @@ Remotes:
7070
ohdsi/ShinyAppBuilder
7171
LinkingTo: Rcpp
7272
NeedsCompilation: yes
73-
RoxygenNote: 7.2.3
73+
RoxygenNote: 7.3.1
7474
Roxygen: list(markdown = TRUE)
7575
Encoding: UTF-8

NEWS.md

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
CohortMethod 5.2.1
2+
==================
3+
4+
Changes:
5+
6+
1. Ask to delete files in output folder when calling `runCmAnalyses()` with different analyses settings than those used to create the files. Also cleaning the cache.
7+
8+
Bugfixes:
9+
10+
1. Fixed bug in parsing covariate filter settings for balance.
11+
12+
2. Updated vignettes to use latest `Capr` functions.
13+
14+
115
CohortMethod 5.2.0
216
==================
317

R/Analyses.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @file Analyses.R
22
#
3-
# Copyright 2023 Observational Health Data Sciences and Informatics
3+
# Copyright 2024 Observational Health Data Sciences and Informatics
44
#
55
# This file is part of CohortMethod
66
#

R/AttritionDiagram.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @file AttritionDiagram.R
22
#
3-
# Copyright 2023 Observational Health Data Sciences and Informatics
3+
# Copyright 2024 Observational Health Data Sciences and Informatics
44
#
55
# This file is part of CohortMethod
66
#

R/Balance.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Observational Health Data Sciences and Informatics
1+
# Copyright 2024 Observational Health Data Sciences and Informatics
22
#
33
# This file is part of CohortMethod
44
#
@@ -36,7 +36,7 @@ filterCovariates <- function(covariates, covariateRef, covariateFilter) {
3636
covariateIds2 <- covariateFilter %>%
3737
filter(!is.na(.data$covariateIds)) %>%
3838
pull(.data$covariateIds) %>%
39-
strsplit(",") %>%
39+
strsplit(",|;") %>%
4040
unlist() %>%
4141
as.numeric()
4242
covariates %>%

R/CohortMethod.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @file CohortMethod.R
22
#
3-
# Copyright 2023 Observational Health Data Sciences and Informatics
3+
# Copyright 2024 Observational Health Data Sciences and Informatics
44
#
55
# This file is part of CohortMethod
66
#

R/CohortMethodData.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Observational Health Data Sciences and Informatics
1+
# Copyright 2024 Observational Health Data Sciences and Informatics
22
#
33
# This file is part of CohortMethod
44
#

R/DataLoadingSaving.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Observational Health Data Sciences and Informatics
1+
# Copyright 2024 Observational Health Data Sciences and Informatics
22
#
33
# This file is part of CohortMethod
44
#

R/Export.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Observational Health Data Sciences and Informatics
1+
# Copyright 2024 Observational Health Data Sciences and Informatics
22
#
33
# This file is part of CohortMethod
44
#

R/HelperFunctions.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @file HelperFunctions.R
22
#
3-
# Copyright 2023 Observational Health Data Sciences and Informatics
3+
# Copyright 2024 Observational Health Data Sciences and Informatics
44
#
55
# This file is part of CohortMethod
66
#

R/KaplanMeier.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @file KaplanMeier.R
22
#
3-
# Copyright 2023 Observational Health Data Sciences and Informatics
3+
# Copyright 2024 Observational Health Data Sciences and Informatics
44
#
55
# This file is part of CohortMethod
66
#

R/OutcomeModels.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Observational Health Data Sciences and Informatics
1+
# Copyright 2024 Observational Health Data Sciences and Informatics
22
#
33
# This file is part of CohortMethod
44
#

R/Power.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @file Power.R
22
#
3-
# Copyright 2023 Observational Health Data Sciences and Informatics
3+
# Copyright 2024 Observational Health Data Sciences and Informatics
44
#
55
# This file is part of CohortMethod
66
#

R/PsFunctions.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Observational Health Data Sciences and Informatics
1+
# Copyright 2024 Observational Health Data Sciences and Informatics
22
#
33
# This file is part of CohortMethod
44
#

R/ResultsDataModel.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Observational Health Data Sciences and Informatics
1+
# Copyright 2024 Observational Health Data Sciences and Informatics
22
#
33
# This file is part of CohortMethod
44
#

R/RunAnalyses.R

+18-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Observational Health Data Sciences and Informatics
1+
# Copyright 2024 Observational Health Data Sciences and Informatics
22
#
33
# This file is part of CohortMethod
44
#
@@ -259,10 +259,26 @@ runCmAnalyses <- function(connectionDetails,
259259
stop("Duplicate analysis IDs are not allowed")
260260
}
261261
outputFolder <- normalizePath(outputFolder, mustWork = FALSE)
262+
cmAnalysisListFile <- file.path(outputFolder, "cmAnalysisList.rds")
263+
if (file.exists(cmAnalysisListFile)) {
264+
oldCmAnalysisList <- readRDS(cmAnalysisListFile)
265+
if (!isTRUE(all.equal(oldCmAnalysisList, cmAnalysisList))) {
266+
rm(list=ls(envir = cache), envir = cache)
267+
message(sprintf("Output files already exist in '%s', but the analysis settings have changed.", outputFolder))
268+
response <- utils::askYesNo("Do you want to delete the old files before proceeding?")
269+
if (is.na(response)) {
270+
# Cancel:
271+
return()
272+
} else if (response == TRUE) {
273+
unlink(outputFolder, recursive = TRUE)
274+
}
275+
}
276+
}
262277
if (!file.exists(outputFolder)) {
263278
dir.create(outputFolder)
264279
}
265-
280+
saveRDS(cmAnalysisList, cmAnalysisListFile)
281+
saveRDS(targetComparatorOutcomesList, file.path(outputFolder, "targetComparatorOutcomesList.rds"))
266282
referenceTable <- createReferenceTable(
267283
cmAnalysisList = cmAnalysisList,
268284
targetComparatorOutcomesList = targetComparatorOutcomesList,
@@ -275,9 +291,6 @@ runCmAnalyses <- function(connectionDetails,
275291
select(-"includedCovariateConceptIds", "excludedCovariateConceptIds") %>%
276292
saveRDS(file.path(outputFolder, "outcomeModelReference.rds"))
277293

278-
saveRDS(cmAnalysisList, file.path(outputFolder, "cmAnalysisList.rds"))
279-
saveRDS(targetComparatorOutcomesList, file.path(outputFolder, "targetComparatorOutcomesList.rds"))
280-
281294
# Create cohortMethodData objects -----------------------------
282295
subset <- referenceTable[!duplicated(referenceTable$cohortMethodDataFile), ]
283296
subset <- subset[subset$cohortMethodDataFile != "", ]

R/Simulation.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Observational Health Data Sciences and Informatics
1+
# Copyright 2024 Observational Health Data Sciences and Informatics
22
#
33
# This file is part of CohortMethod
44
#

R/StudyPopulation.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Observational Health Data Sciences and Informatics
1+
# Copyright 2024 Observational Health Data Sciences and Informatics
22
#
33
# This file is part of CohortMethod
44
#

R/Table1.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @file Table1.R
22
#
3-
# Copyright 2023 Observational Health Data Sciences and Informatics
3+
# Copyright 2024 Observational Health Data Sciences and Informatics
44
#
55
# This file is part of CohortMethod
66
#

R/Viewer.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Observational Health Data Sciences and Informatics
1+
# Copyright 2024 Observational Health Data Sciences and Informatics
22
#
33
# This file is part of CohortMethod
44
#

docs/404.html

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)