Skip to content

Commit 68c3df5

Browse files
committed
Merge branch 'develop' of github.com:CorrelAid/a4d into develop
2 parents 1989551 + cdf115d commit 68c3df5

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

R/script3_create_table_patient_data_annual.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ create_table_patient_data_annual <- function(patient_data_files, input_root, out
5656
annual_patient_data <- annual_patient_data %>%
5757
dplyr::filter(tracker_year >= 2024) %>%
5858
dplyr::group_by(patient_id, tracker_year) %>%
59-
dplyr::slice_max(tracker_month, n = 1) %>% # Get the last month for each year
59+
dplyr::slice_max(tracker_month, n = 1, with_ties = FALSE) %>% # Get the last month for each year
6060
dplyr::ungroup() %>%
6161
dplyr::arrange(tracker_year, tracker_month, patient_id)
6262

R/script3_create_table_patient_data_static.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ create_table_patient_data_static <- function(patient_data_files, input_root, out
4545
static_patient_data <- static_patient_data %>%
4646
dplyr::group_by(patient_id) %>%
4747
dplyr::slice_max(tracker_year, n = 1) %>%
48-
dplyr::slice_max(tracker_month, n = 1) %>%
48+
dplyr::slice_max(tracker_month, n = 1, with_ties = FALSE) %>%
4949
dplyr::ungroup() %>%
5050
dplyr::arrange(tracker_year, tracker_month, patient_id)
5151

0 commit comments

Comments
 (0)