From eac61b867ac91d9253536a2eeee0946418fd06b6 Mon Sep 17 00:00:00 2001 From: yidanzh0518 Date: Thu, 12 Dec 2024 14:30:44 -0700 Subject: [PATCH] try ubuntu 2.0 --- R/cooccur_local.R | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/R/cooccur_local.R b/R/cooccur_local.R index 1351e31..370e628 100644 --- a/R/cooccur_local.R +++ b/R/cooccur_local.R @@ -35,13 +35,6 @@ cooccur_local <- function(data, id_col, time_col, code_col, window = NA) { - if (Sys.getenv("_R_CHECK_PACKAGE_NAME_") != "") { - plan(sequential) # Use sequential during checks - } else { - plan(multisession) # Default to parallel - } - - # Ensure data is a data.table setDT(data) @@ -77,6 +70,8 @@ cooccur_local <- function(data, id_col, time_col, code_col, window = NA) { # Split data by patient patient_list <- split(data, by = id_col) + options(future.globals.maxSize = 1e9) + # Use parallel processing for patient subsets plan(multisession) # Start parallel processing results <- future_lapply(patient_list, process_patient)