1
0
mirror of https://github.com/msberends/AMR.git synced 2026-04-28 09:03:51 +02:00

Migrate parallel computing in as.sir() from parallel:: to future/future.apply

Replace parallel::mclapply() and parallel::parLapply() with
future.apply::future_lapply(), enabling transparent support for any
future backend (multisession, multicore, mirai_multisession, cluster)
on all platforms including Windows.

When parallel = TRUE the function now: (1) respects an active
future::plan() set by the user without overriding it on exit, or
(2) sets a temporary multisession plan with parallelly::availableCores()
and tears it down on exit. The max_cores argument controls worker count
only when no user plan is active.

future and future.apply are added to Suggests in DESCRIPTION.

https://claude.ai/code/session_01M1Jvf2Miu6JL4TQrEh1wS8
This commit is contained in:
Claude
2026-04-27 12:21:48 +00:00
parent 3f1b20c304
commit b1cf7a94ad
10 changed files with 80 additions and 101 deletions

View File

@@ -1,6 +1,6 @@
Package: AMR
Version: 3.0.1.9052
Date: 2026-04-25
Version: 3.0.1.9053
Date: 2026-04-27
Title: Antimicrobial Resistance Data Analysis
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
data analysis and to work with microbial and antimicrobial properties by
@@ -37,13 +37,15 @@ Authors@R: c(
person(given = c("Casper", "J."), family = "Albers", role = "ths", comment = c(ORCID = "0000-0002-9213-6743")),
person(given = c("Corinna"), family = "Glasner", role = "ths", comment = c(ORCID = "0000-0003-1241-1328")))
Depends: R (>= 3.0.0)
Suggests:
Suggests:
cleaner,
cli,
crayon,
curl,
data.table,
dplyr,
future,
future.apply,
ggplot2,
knitr,
openxlsx,