Skip to content

Commit

Permalink
another filter before join
Browse files Browse the repository at this point in the history
  • Loading branch information
egillax committed Dec 21, 2023
1 parent 8f8ccb8 commit 5bb4c8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/PopulationSettings.R
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,9 @@ createStudyPopulation <- function(
ParallelLogger::logTrace("Removing subjects with prior outcomes (if any)")

# get the outcomes during TAR
outcomeBefore <- population %>%
dplyr::inner_join(plpData$outcomes, by ='rowId') %>%
outcomeBefore <- plpData$outcomes %>%
dplyr::filter(outcomeId == get('oId')) %>%
dplyr::inner_join(population, by = 'rowId') %>%
dplyr::select("rowId", "daysToEvent", "tarStart") %>%
dplyr::filter(.data$daysToEvent < .data$tarStart & .data$daysToEvent > -get('priorOutcomeLookback') )

Expand Down

0 comments on commit 5bb4c8a

Please sign in to comment.