Skip to content

Commit

Permalink
Update AggregateCovariates.R
Browse files Browse the repository at this point in the history
fixing issue with different case tars having same id
  • Loading branch information
jreps committed Aug 5, 2024
1 parent bb26ce7 commit a649f55
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/AggregateCovariates.R
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,6 @@ computeCaseAggregateCovariateAnalyses <- function(
cohortType = c('Cases', 'CasesBefore', 'CasesAfter', 'CasesBetween')
)

cohortDetails$cohortDefinitionId <- 1:nrow(cohortDetails)
cohortDetails$minPriorObservation <- settings$minPriorObservation
cohortDetails$outcomeWashoutDays <- settings$outcomeWashoutDays
cohortDetails$casePreTargetDuration <- settings$casePreTargetDuration
Expand All @@ -374,6 +373,8 @@ computeCaseAggregateCovariateAnalyses <- function(

# add executionIds
cohortDetails <- merge(cohortDetails, tars)
# moved id so different tars have different id?
cohortDetails$cohortDefinitionId <- 1:nrow(cohortDetails)

# add 'Exclude' with random tar
cohortDetailsExtra <- expand.grid(
Expand Down

0 comments on commit a649f55

Please sign in to comment.