From 1b9991a06f26f80740e22c8ab789bdb587c17d2c Mon Sep 17 00:00:00 2001 From: lizihao-anu Date: Mon, 28 Oct 2024 10:43:29 +0000 Subject: [PATCH] Style code --- R/process_extract_ae.R | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/R/process_extract_ae.R b/R/process_extract_ae.R index 33c23d8d6..196f6567c 100644 --- a/R/process_extract_ae.R +++ b/R/process_extract_ae.R @@ -220,20 +220,24 @@ process_extract_ae <- function(data, year, write_to_disk = TRUE) { ae_cup_clean <- ae_cup_file %>% # Remove any duplicates dplyr::distinct(.data$record_keydate1, - .data$keytime1, - .data$record_keydate2, - .data$keytime2, - .data$case_ref_number, - .keep_all = TRUE) + .data$keytime1, + .data$record_keydate2, + .data$keytime2, + .data$case_ref_number, + .keep_all = TRUE + ) # Join data-------------------------------------------- matched_ae_data <- outfile %>% dplyr::left_join(ae_cup_clean, - by = c("record_keydate1", "keytime1", - "record_keydate2", "keytime2", - "case_ref_number")) %>% + by = c( + "record_keydate1", "keytime1", + "record_keydate2", "keytime2", + "case_ref_number" + ) + ) %>% dplyr::arrange( .data$chi, .data$record_keydate1,